Commit f85dbda0 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 98ae1cca
...@@ -409,7 +409,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) ...@@ -409,7 +409,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
break; break;
default: default:
BUG(); BUG();
return -EINVAL; goto err;
} }
wm8994->supplies = kzalloc(sizeof(struct regulator_bulk_data) * wm8994->supplies = kzalloc(sizeof(struct regulator_bulk_data) *
...@@ -431,7 +431,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) ...@@ -431,7 +431,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
break; break;
default: default:
BUG(); BUG();
return -EINVAL; goto err;
} }
ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies, ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment