From patchwork Mon Sep 21 13:11:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qinglang Miao X-Patchwork-Id: 11789773 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 84242139A for ; Mon, 21 Sep 2020 13:11:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70C9D2076E for ; Mon, 21 Sep 2020 13:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727459AbgIUNKz (ORCPT ); Mon, 21 Sep 2020 09:10:55 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:43372 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727447AbgIUNKx (ORCPT ); Mon, 21 Sep 2020 09:10:53 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9D90D2A83FCA30DE087F; Mon, 21 Sep 2020 21:10:52 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:45 +0800 From: Qinglang Miao To: Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , "Arnd Bergmann" , Greg Kroah-Hartman CC: , , Qinglang Miao Subject: [PATCH -next] tpm/st33zp24: simplify the return expression of st33zp24_spi_probe() Date: Mon, 21 Sep 2020 21:11:09 +0800 Message-ID: <20200921131109.93319-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/char/tpm/st33zp24/spi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/char/tpm/st33zp24/spi.c b/drivers/char/tpm/st33zp24/spi.c index a75dafd39..4580bddbe 100644 --- a/drivers/char/tpm/st33zp24/spi.c +++ b/drivers/char/tpm/st33zp24/spi.c @@ -384,13 +384,8 @@ static int st33zp24_spi_probe(struct spi_device *dev) static int st33zp24_spi_remove(struct spi_device *dev) { struct tpm_chip *chip = spi_get_drvdata(dev); - int ret; - ret = st33zp24_remove(chip); - if (ret) - return ret; - - return 0; + return st33zp24_remove(chip); } static const struct spi_device_id st33zp24_spi_id[] = {