From: Axel Lin Date: Sun, 30 Jul 2017 10:58:15 +0000 (+0800) Subject: mfd: lp87565: Convert to use devm_mfd_add_devices() X-Git-Tag: v4.14-rc1~110^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea3993a9bdb77375a91e88b5e5f853474b095dd5;p=platform%2Fkernel%2Flinux-rpi.git mfd: lp87565: Convert to use devm_mfd_add_devices() This fixes missing mfd_remove_devices() call when unload the module. Signed-off-by: Axel Lin Reviewed-by: Keerthy Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/lp87565.c b/drivers/mfd/lp87565.c index 340ad0c..32d2a07 100644 --- a/drivers/mfd/lp87565.c +++ b/drivers/mfd/lp87565.c @@ -73,10 +73,9 @@ static int lp87565_probe(struct i2c_client *client, i2c_set_clientdata(client, lp87565); - ret = mfd_add_devices(lp87565->dev, PLATFORM_DEVID_AUTO, lp87565_cells, - ARRAY_SIZE(lp87565_cells), NULL, 0, NULL); - - return ret; + return devm_mfd_add_devices(lp87565->dev, PLATFORM_DEVID_AUTO, + lp87565_cells, ARRAY_SIZE(lp87565_cells), + NULL, 0, NULL); } static const struct i2c_device_id lp87565_id_table[] = {