Skip to contentSkip to conversation

mfd: Fix WM8994 error handling

PATCH In review Joonyoung Shim 3 participants 3 messages Feb 7, 2010 – Feb 11, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: Fix WM8994 error handling

This patch fixes wrong goto statement for error handling on probe.

---
 drivers/mfd/wm8994-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/wm8994-core.c +2 -2
index 299c1af..844e1c1 100644
@@ -305,14 +305,14 @@ static int wm8994_device_init(struct wm8994 *wm8994, unsigned long id, int irq)
 				 wm8994->supplies);
 	if (ret != 0) {
 		dev_err(wm8994->dev, "Failed to get supplies: %d\n", ret);
-		goto err_get;
+		goto err_supplies;
 	}
 
 	ret = regulator_bulk_enable(ARRAY_SIZE(wm8994_main_supplies),
 				    wm8994->supplies);
 	if (ret != 0) {
 		dev_err(wm8994->dev, "Failed to enable supplies: %d\n", ret);
-		goto err_supplies;
+		goto err_get;
 	}
 
 	ret = wm8994_reg_read(wm8994, WM8994_SOFTWARE_RESET);
Signature · 1 line
1.6.3.3
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Joonyoung Shim

This patch fixes wrong goto statement for error handling on probe.

Good catch, thanks.

Quoted 27 lines
---
 drivers/mfd/wm8994-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/wm8994-core.c +2 -2
index 299c1af..844e1c1 100644
@@ -305,14 +305,14 @@ static int wm8994_device_init(struct wm8994 *wm8994, unsigned long id, int irq)
 				 wm8994->supplies);
 	if (ret != 0) {
 		dev_err(wm8994->dev, "Failed to get supplies: %d\n", ret);
-		goto err_get;
+		goto err_supplies;
 	}
 
 	ret = regulator_bulk_enable(ARRAY_SIZE(wm8994_main_supplies),
 				    wm8994->supplies);
 	if (ret != 0) {
 		dev_err(wm8994->dev, "Failed to enable supplies: %d\n", ret);
-		goto err_supplies;
+		goto err_get;
 	}
 
 	ret = wm8994_reg_read(wm8994, WM8994_SOFTWARE_RESET);
Signature · 1 line
1.6.3.3
#2 lore raw
In reply to Joonyoung Shim

Hi,

Quoted 1 line · Joonyoung Shim

This patch fixes wrong goto statement for error handling on probe.

Patch applied, many thanks.

Cheers,
Samuel.

Quoted 29 lines
---
 drivers/mfd/wm8994-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/wm8994-core.c +2 -2
index 299c1af..844e1c1 100644
@@ -305,14 +305,14 @@ static int wm8994_device_init(struct wm8994 *wm8994, unsigned long id, int irq)
 				 wm8994->supplies);
 	if (ret != 0) {
 		dev_err(wm8994->dev, "Failed to get supplies: %d\n", ret);
-		goto err_get;
+		goto err_supplies;
 	}
 
 	ret = regulator_bulk_enable(ARRAY_SIZE(wm8994_main_supplies),
 				    wm8994->supplies);
 	if (ret != 0) {
 		dev_err(wm8994->dev, "Failed to enable supplies: %d\n", ret);
-		goto err_supplies;
+		goto err_get;
 	}
 
 	ret = wm8994_reg_read(wm8994, WM8994_SOFTWARE_RESET);
Signature · 1 line
1.6.3.3
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/