diff mbox series

[-next] tpm/st33zp24: simplify the return expression of st33zp24_spi_probe()

Message ID 20200921131109.93319-1-miaoqinglang@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] tpm/st33zp24: simplify the return expression of st33zp24_spi_probe() | expand

Commit Message

Qinglang Miao Sept. 21, 2020, 1:11 p.m. UTC
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/char/tpm/st33zp24/spi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

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[] = {