Skip to contentSkip to conversation

mfd: Fix error handling if BUG() isn't enabled in WM8994

PATCH Applied Mark Brown 2 participants 2 messages Jun 17, 2011 – Jun 20, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: Fix error handling if BUG() isn't enabled in WM8994

Even if we would've BUG()ed we should still tidy up after ourselves if that isn't enabled in the kernel config.

---
 drivers/mfd/wm8994-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/wm8994-core.c +2 -2
index 088ee80..ff50cf7 100644
@@ -422,7 +422,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
 		break;
 	default:
 		BUG();
-		return -EINVAL;
+		goto err;
 	}
 
 	wm8994->supplies = kzalloc(sizeof(struct regulator_bulk_data) *
@@ -448,7 +448,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
 		break;
 	default:
 		BUG();
-		return -EINVAL;
+		goto err;
 	}
 		
 	ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies,
Signature · 1 line
1.7.5.4
Applied
#1 lore raw

Hi Mark,

Quoted 2 lines · Mark Brown

Even if we would've BUG()ed we should still tidy up after ourselves if that isn't enabled in the kernel config.

I applied this one as well, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/