public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 01/12] mfd: da9063: Fix failpath in core
@ 2018-06-05 23:10 Marek Vasut
  2018-06-05 23:10 ` [PATCH v4 02/12] mfd: da9063: Use REGMAP_IRQ_REG Marek Vasut
                   ` (12 more replies)
  0 siblings, 13 replies; 23+ messages in thread
From: Marek Vasut @ 2018-06-05 23:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Marek Vasut, Geert Uytterhoeven, Lee Jones, Mark Brown,
	Steve Twiss, Wolfram Sang, linux-renesas-soc

In case mfd_add_devices() fails, da9063_irq_exit() is not called to
undo the IRQchip setup done by da9063_irq_init(). Fix this by adding
the missing fail path.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Steve Twiss <stwiss.opensource@diasemi.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org
---
V3: New patch
V4: No change
---
 drivers/mfd/da9063-core.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c
index 6c2870d4e754..8226ebd8b96d 100644
--- a/drivers/mfd/da9063-core.c
+++ b/drivers/mfd/da9063-core.c
@@ -229,10 +229,16 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
 	ret = mfd_add_devices(da9063->dev, -1, da9063_devs,
 			      ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base,
 			      NULL);
-	if (ret)
+	if (ret) {
 		dev_err(da9063->dev, "Cannot add MFD cells\n");
+		goto err_irq_exit;
+	}
 
 	return ret;
+
+err_irq_exit:
+	da9063_irq_exit(da9063);
+	return ret;
 }
 
 void da9063_device_exit(struct da9063 *da9063)
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-06-06 14:04 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-05 23:10 [PATCH v4 01/12] mfd: da9063: Fix failpath in core Marek Vasut
2018-06-05 23:10 ` [PATCH v4 02/12] mfd: da9063: Use REGMAP_IRQ_REG Marek Vasut
2018-06-05 23:10 ` [PATCH v4 03/12] mfd: da9063: Use PLATFORM_DEVID_NONE Marek Vasut
2018-06-06  6:25   ` Geert Uytterhoeven
2018-06-06  6:34   ` Lee Jones
2018-06-05 23:10 ` [PATCH v4 04/12] mfd: da9063: Replace DA9063_NUM_IRQ with ARRAY_SIZE Marek Vasut
2018-06-06  6:28   ` Geert Uytterhoeven
2018-06-06  6:36   ` Lee Jones
2018-06-05 23:10 ` [PATCH v4 05/12] mfd: da9063: Rename PMIC_DA9063 to PMIC_CHIP_ID_DA9063 Marek Vasut
2018-06-05 23:10 ` [PATCH v4 06/12] mfd: da9063: Replace model with type Marek Vasut
2018-06-06 14:04   ` kbuild test robot
2018-06-05 23:10 ` [PATCH v4 07/12] mfd: da9063: Add DA9063L type Marek Vasut
2018-06-05 23:10 ` [PATCH v4 08/12] mfd: da9063: Add custom regmap for DA9063L Marek Vasut
2018-06-06  6:39   ` Lee Jones
2018-06-06  9:47     ` Marek Vasut
2018-06-05 23:10 ` [PATCH v4 09/12] mfd: da9063: Add custom IRQ map " Marek Vasut
2018-06-06  6:40   ` Lee Jones
2018-06-05 23:10 ` [PATCH v4 10/12] mfd: da9063: Register RTC only on DA9063L Marek Vasut
2018-06-06  6:41   ` Lee Jones
2018-06-05 23:10 ` [PATCH v4 11/12] regulator: da9063: Handle less LDOs " Marek Vasut
2018-06-05 23:10 ` [PATCH v4 12/12] mfd: da9063: Add DA9063L support Marek Vasut
2018-06-06  6:24 ` [PATCH v4 01/12] mfd: da9063: Fix failpath in core Geert Uytterhoeven
2018-06-06  6:35 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox