summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-pca9532.c
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-19 18:08:53 +0800
committerPavel Machek <pavel@ucw.cz>2020-09-26 21:56:42 +0200
commitc4241abcd50019adafb11d8aa8269d242c4f42b4 (patch)
tree39e12ae537e5b9e67c76b473317b055998dc01a5 /drivers/leds/leds-pca9532.c
parentf847ef543ce45c917bcbcafb2555aa9e5968c385 (diff)
downloadlinux-c4241abcd50019adafb11d8aa8269d242c4f42b4.tar.gz
linux-c4241abcd50019adafb11d8aa8269d242c4f42b4.tar.bz2
linux-c4241abcd50019adafb11d8aa8269d242c4f42b4.zip
leds: pca9532 - simplify the return expression of pca9532_remove
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-pca9532.c')
-rw-r--r--drivers/leds/leds-pca9532.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
index f834550999dd..41229f775d35 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);