diff mbox series

[-next] tpm/st33zp24/i2c: simplify the return expression of st33zp24_i2c_remove

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

Commit Message

Liu Shixin Sept. 21, 2020, 8:24 a.m. UTC
Simplify the return expression.

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

Patch

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