* [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
@ 2009-12-15 19:07 Roel Kluin
2009-12-15 19:10 ` Mark Brown
2009-12-16 15:57 ` Liam Girdwood
0 siblings, 2 replies; 3+ messages in thread
From: Roel Kluin @ 2009-12-15 19:07 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Andrew Morton, LKML
ret should be signed to notice a failure in wm831x_reg_read().
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Found using coccinelle: http://coccinelle.lip6.fr/
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 902db56..61e02ac 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -470,7 +470,7 @@ static unsigned int wm831x_aldo_get_mode(struct regulator_dev *rdev)
struct wm831x_ldo *ldo = rdev_get_drvdata(rdev);
struct wm831x *wm831x = ldo->wm831x;
int on_reg = ldo->base + WM831X_LDO_ON_CONTROL;
- unsigned int ret;
+ int ret;
ret = wm831x_reg_read(wm831x, on_reg);
if (ret < 0)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
2009-12-15 19:07 [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode() Roel Kluin
@ 2009-12-15 19:10 ` Mark Brown
2009-12-16 15:57 ` Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2009-12-15 19:10 UTC (permalink / raw)
To: Roel Kluin; +Cc: Liam Girdwood, Andrew Morton, LKML
On Tue, Dec 15, 2009 at 08:07:31PM +0100, Roel Kluin wrote:
> ret should be signed to notice a failure in wm831x_reg_read().
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Thanks
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
2009-12-15 19:07 [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode() Roel Kluin
2009-12-15 19:10 ` Mark Brown
@ 2009-12-16 15:57 ` Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2009-12-16 15:57 UTC (permalink / raw)
To: Roel Kluin; +Cc: Mark Brown, Andrew Morton, LKML
On Tue, 2009-12-15 at 20:07 +0100, Roel Kluin wrote:
> ret should be signed to notice a failure in wm831x_reg_read().
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> Found using coccinelle: http://coccinelle.lip6.fr/
>
> diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
> index 902db56..61e02ac 100644
> --- a/drivers/regulator/wm831x-ldo.c
> +++ b/drivers/regulator/wm831x-ldo.c
> @@ -470,7 +470,7 @@ static unsigned int wm831x_aldo_get_mode(struct regulator_dev *rdev)
> struct wm831x_ldo *ldo = rdev_get_drvdata(rdev);
> struct wm831x *wm831x = ldo->wm831x;
> int on_reg = ldo->base + WM831X_LDO_ON_CONTROL;
> - unsigned int ret;
> + int ret;
>
> ret = wm831x_reg_read(wm831x, on_reg);
> if (ret < 0)
Applied.
Thanks
Liam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-16 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 19:07 [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode() Roel Kluin
2009-12-15 19:10 ` Mark Brown
2009-12-16 15:57 ` Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox