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

Christophe JAILLET posted 1 patch 3 months, 2 weeks ago
drivers/mfd/da9055-core.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] mfd: da9055: Simplify the error handling path in da9055_device_init()
Posted by Christophe JAILLET 3 months, 2 weeks ago
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch applies on top of be8512ed1582 ("mfd: da9055: Fix missing
regmap_del_irq_chip() in error path")
---
 drivers/mfd/da9055-core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c
index 8c989b74f924..158590ad37d4 100644
--- a/drivers/mfd/da9055-core.c
+++ b/drivers/mfd/da9055-core.c
@@ -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;
 }
-- 
2.51.0
Re: (subset) [PATCH] mfd: da9055: Simplify the error handling path in da9055_device_init()
Posted by Lee Jones 3 months ago
On Sat, 25 Oct 2025 13:27:16 +0200, Christophe JAILLET wrote:
> 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.
> 
> 
> [...]

Applied, thanks!

[1/1] mfd: da9055: Simplify the error handling path in da9055_device_init()
      commit: 049929c5a159c8671b9b0c12a7da963fef535b00

--
Lee Jones [李琼斯]