[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200919100853.1639215-1-liushixin2@huawei.com>
Date: Sat, 19 Sep 2020 18:08:53 +0800
From: Liu Shixin <liushixin2@...wei.com>
To: Riku Voipio <riku.voipio@....fi>, Pavel Machek <pavel@....cz>,
Dan Murphy <dmurphy@...com>
CC: <linux-leds@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Liu Shixin <liushixin2@...wei.com>
Subject: [PATCH -next] leds: pca9532 - simplify the return expression of pca9532_remove
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@...wei.com>
---
drivers/leds/leds-pca9532.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
index 7d515d5e57bd..88d2edf285c2 100644
--- a/drivers/leds/leds-pca9532.c
+++ b/drivers/leds/leds-pca9532.c
@@ -545,13 +545,8 @@ static int pca9532_probe(struct i2c_client *client,
static int pca9532_remove(struct i2c_client *client)
{
struct pca9532_data *data = i2c_get_clientdata(client);
- int err;
- err = pca9532_destroy_devices(data, data->chip_info->num_leds);
- if (err)
- return err;
-
- return 0;
+ return pca9532_destroy_devices(data, data->chip_info->num_leds);
}
module_i2c_driver(pca9532_driver);
--
2.25.1
Powered by blists - more mailing lists