2012-10-25 14:15:28

by Alan

[permalink] [raw]
Subject: [PATCH RESEND] max17042: missing assignment

From: Alan Cox <[email protected]>

The second error check is unreachable because the lock function
isn't assigned to ret

Signed-off-by: Alan Cox <[email protected]>
---

drivers/power/max17042_battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 74abc6c..73b432d 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -572,7 +572,7 @@ static int max17042_init_chip(struct max17042_chip *chip)
__func__);
return -EIO;
}
- max17042_verify_model_lock(chip);
+ ret = max17042_verify_model_lock(chip);
if (ret) {
dev_err(&chip->client->dev, "%s lock verify failed\n",
__func__);


2012-10-25 14:28:11

by Pallala, Ramakrishna

[permalink] [raw]
Subject: RE: [PATCH RESEND] max17042: missing assignment


Thanks Alan.

> The second error check is unreachable because the lock function isn't assigned
> to ret
>
> Signed-off-by: Alan Cox <[email protected]>
Acked-by: Ramakrishna Pallala <[email protected]>

> ---
>
> drivers/power/max17042_battery.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/max17042_battery.c
> b/drivers/power/max17042_battery.c
> index 74abc6c..73b432d 100644
> --- a/drivers/power/max17042_battery.c
> +++ b/drivers/power/max17042_battery.c
> @@ -572,7 +572,7 @@ static int max17042_init_chip(struct max17042_chip
> *chip)
> __func__);
> return -EIO;
> }
> - max17042_verify_model_lock(chip);
> + ret = max17042_verify_model_lock(chip);
> if (ret) {
> dev_err(&chip->client->dev, "%s lock verify failed\n",
> __func__);

????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2012-11-18 23:07:08

by Anton Vorontsov

[permalink] [raw]
Subject: Re: [PATCH RESEND] max17042: missing assignment

On Thu, Oct 25, 2012 at 02:28:03PM +0000, Pallala, Ramakrishna wrote:
>
> Thanks Alan.
>
> > The second error check is unreachable because the lock function isn't assigned
> > to ret
> >
> > Signed-off-by: Alan Cox <[email protected]>
> Acked-by: Ramakrishna Pallala <[email protected]>

For some reason I don't have the original patch in my mailbox. I wonder if
I have not been Cc'ed on this one or it got lost...

Anyway, I reconstructed it by hand and applied, thanks a lot!

Anton.

> > ---
> >
> > drivers/power/max17042_battery.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/power/max17042_battery.c
> > b/drivers/power/max17042_battery.c
> > index 74abc6c..73b432d 100644
> > --- a/drivers/power/max17042_battery.c
> > +++ b/drivers/power/max17042_battery.c
> > @@ -572,7 +572,7 @@ static int max17042_init_chip(struct max17042_chip
> > *chip)
> > __func__);
> > return -EIO;
> > }
> > - max17042_verify_model_lock(chip);
> > + ret = max17042_verify_model_lock(chip);
> > if (ret) {
> > dev_err(&chip->client->dev, "%s lock verify failed\n",
> > __func__);
>