From patchwork Mon Sep 21 08:24:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Shixin X-Patchwork-Id: 11788771 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 217291668 for ; Mon, 21 Sep 2020 08:03:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1351B2151B for ; Mon, 21 Sep 2020 08:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726468AbgIUIDC (ORCPT ); Mon, 21 Sep 2020 04:03:02 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48692 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726945AbgIUICp (ORCPT ); Mon, 21 Sep 2020 04:02:45 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id BD625B29417C5FE20116; Mon, 21 Sep 2020 16:02:41 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:31 +0800 From: Liu Shixin To: Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , "Arnd Bergmann" , Greg Kroah-Hartman CC: , , "Liu Shixin" Subject: [PATCH -next] tpm/st33zp24/i2c: simplify the return expression of st33zp24_i2c_remove Date: Mon, 21 Sep 2020 16:24:56 +0800 Message-ID: <20200921082456.2592242-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/char/tpm/st33zp24/i2c.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/char/tpm/st33zp24/i2c.c b/drivers/char/tpm/st33zp24/i2c.c index 7c617edff4ca..b180171e5678 100644 --- a/drivers/char/tpm/st33zp24/i2c.c +++ b/drivers/char/tpm/st33zp24/i2c.c @@ -267,13 +267,8 @@ static int st33zp24_i2c_probe(struct i2c_client *client, static int st33zp24_i2c_remove(struct i2c_client *client) { struct tpm_chip *chip = i2c_get_clientdata(client); - int ret; - ret = st33zp24_remove(chip); - if (ret) - return ret; - - return 0; + return st33zp24_remove(chip); } static const struct i2c_device_id st33zp24_i2c_id[] = {