Skip to content

Commit

Permalink
mfd: Fix error handling if BUG() isn't enabled in WM8994
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jul 31, 2011
1 parent 98ae1cc commit f85dbda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,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) *
Expand All @@ -431,7 +431,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,
Expand Down

0 comments on commit f85dbda

Please sign in to comment.