Commit 049929c5 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Lee Jones
Browse files

mfd: da9055: Simplify the error handling path in da9055_device_init()



If mfd_add_devices() fails, there is no need to call mfd_remove_devices().
The needed clean-up is already done in the error handling path of
mfd_add_devices().

So, remove the unneeded (and harmless) call.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/871f52e7ab5d12853bc39f36ac78b5a8e484d863.1761391599.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 2bac49ba
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -387,7 +387,6 @@ int da9055_device_init(struct da9055 *da9055)
	return 0;

err:
	mfd_remove_devices(da9055->dev);
	regmap_del_irq_chip(da9055->chip_irq, da9055->irq_data);
	return ret;
}