lkml.org 
[lkml]   [2009]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] regulator: wm831x_reg_read() failure unnoticed in wm831x_aldo_get_mode()
    From
    Date
    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



    \
     
     \ /
      Last update: 2009-12-16 16:59    [W:4.382 / U:2.400 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site