Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mark Brown and committed by
Samuel Ortiz
f85dbda0 98ae1cca

+2 -2
+2 -2
drivers/mfd/wm8994-core.c
··· 409 409 break; 410 410 default: 411 411 BUG(); 412 - return -EINVAL; 412 + goto err; 413 413 } 414 414 415 415 wm8994->supplies = kzalloc(sizeof(struct regulator_bulk_data) * ··· 431 431 break; 432 432 default: 433 433 BUG(); 434 - return -EINVAL; 434 + goto err; 435 435 } 436 436 437 437 ret = regulator_bulk_get(wm8994->dev, wm8994->num_supplies,