2011-02-02 20:17:26

by Mark Brown

[permalink] [raw]
Subject: [PATCH] regulator: Fix warning with CONFIG_BUG disabled

Signed-off-by: Mark Brown <[email protected]>
---
drivers/regulator/wm831x-dcdc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index 8b0d2c4..06df898 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -120,6 +120,7 @@ static unsigned int wm831x_dcdc_get_mode(struct regulator_dev *rdev)
return REGULATOR_MODE_IDLE;
default:
BUG();
+ return -EINVAL;
}
}

--
1.7.2.3


2011-02-03 09:56:07

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] regulator: Fix warning with CONFIG_BUG disabled

On Wed, 2011-02-02 at 20:17 +0000, Mark Brown wrote:
> Signed-off-by: Mark Brown <[email protected]>
> ---
> drivers/regulator/wm831x-dcdc.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
> index 8b0d2c4..06df898 100644
> --- a/drivers/regulator/wm831x-dcdc.c
> +++ b/drivers/regulator/wm831x-dcdc.c
> @@ -120,6 +120,7 @@ static unsigned int wm831x_dcdc_get_mode(struct regulator_dev *rdev)
> return REGULATOR_MODE_IDLE;
> default:
> BUG();
> + return -EINVAL;
> }
> }
>

Applied.

Thanks

Liam

--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk