lkml.org 
[lkml]   [2011]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mfd: Fix error handling if BUG() isn't enabled in WM8994
Date
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>
---
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 088ee80..ff50cf7 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -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,
--
1.7.5.4


\
 
 \ /
  Last update: 2011-06-17 13:21    [W:0.062 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site