diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-17 07:19:41 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-07-31 17:28:21 -0400 |
commit | f85dbda076a11c18b396f8acfff929e53159e56d (patch) | |
tree | 7ffae62f37c1a2a159a56d2251bd097b1f0ac3bd /drivers/mfd/wm8994-core.c | |
parent | 98ae1ccaf62d5006884e01159bf7a63174b0fc03 (diff) |
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.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
-rw-r--r-- | drivers/mfd/wm8994-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 7caf0d82a9a2..96479c9b1728 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -409,7 +409,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
409 | break; | 409 | break; |
410 | default: | 410 | default: |
411 | BUG(); | 411 | BUG(); |
412 | return -EINVAL; | 412 | goto err; |
413 | } | 413 | } |
414 | 414 | ||
415 | wm8994->supplies = kzalloc(sizeof(struct regulator_bulk_data) * | 415 | wm8994->supplies = kzalloc(sizeof(struct regulator_bulk_data) * |
@@ -431,7 +431,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
431 | break; | 431 | break; |
432 | default: | 432 | default: |
433 | BUG(); | 433 | BUG(); |
434 | return -EINVAL; | 434 | goto err; |
435 | } | 435 | } |
436 | 436 | ||
437 | ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies, | 437 | ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies, |