lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALAt2gHYHfxWUc59F8VHNiF2omKzYE0rxhvRb3rZYgFYJTf3Ww@mail.gmail.com>
Date:   Fri, 3 Aug 2018 19:47:18 +0530
From:   Parth Shah <sparth1292@...il.com>
To:     jdelvare@...e.de
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg KH <gregkh@...uxfoundation.org>,
        Bhumika Goyal <bhumirks@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: eeprom: assignment outside the if statement

Hello Jean,

Thank you for your response.

So, can we consider this patch?

Regards,
Parth Y Shah

On Fri, Aug 3, 2018 at 6:06 PM Jean Delvare <jdelvare@...e.de> wrote:

> On Fri,  3 Aug 2018 14:50:43 +0530, Parth Y Shah wrote:
> > Assignment of any variable should be kept outside the if statement
>
> Actually there are exceptions to that rule, but this isn't one of them.
>
> > Signed-off-by: Parth Y Shah <sparth1292@...il.com>
> > ---
> >  drivers/misc/eeprom/max6875.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/misc/eeprom/max6875.c
> b/drivers/misc/eeprom/max6875.c
> > index 0e32709..fc0cf9a 100644
> > --- a/drivers/misc/eeprom/max6875.c
> > +++ b/drivers/misc/eeprom/max6875.c
> > @@ -148,7 +148,8 @@ static int max6875_probe(struct i2c_client *client,
> >       if (client->addr & 1)
> >               return -ENODEV;
> >
> > -     if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL)))
> > +     data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL);
> > +     if (!data)
> >               return -ENOMEM;
> >
> >       /* A fake client is created on the odd address */
>
> Reviewed-by: Jean Delvare <jdelvare@...e.de>
>
> Thanks,
> --
> Jean Delvare
> SUSE L3 Support
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ