Skip to content

Commit

Permalink
leds: pca9532 - simplify the return expression of pca9532_remove
Browse files Browse the repository at this point in the history
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
  • Loading branch information
Liu Shixin authored and Pavel Machek committed Sep 26, 2020
1 parent f847ef5 commit c4241ab
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/leds/leds-pca9532.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c4241ab

Please sign in to comment.