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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfQY_7WQZTxGG17Ps=VHGrnGdUAdRpacPYeJEMK5PS6yA@mail.gmail.com>
Date:   Sat, 20 Aug 2022 18:56:53 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     Antoniu Miclaus <antoniu.miclaus@...log.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>
Subject: Re: [PATCH] iio: frequency: admv1014: return -EINVAL directly

On Fri, Aug 19, 2022 at 8:41 PM Jonathan Cameron <jic23@...nel.org> wrote:
> On Fri, 19 Aug 2022 13:41:17 +0300
> Antoniu Miclaus <antoniu.miclaus@...log.com> wrote:
>
> > Remove extra step where the error code is assigned to the `ret`
> > variable.
> >
> > Return instead error code directly.

...

> Change is fine, but I've dropped the fixes tag. The code before this
> wasn't broken, just longer than it needed to be. We don't want the noise
> of this getting backported because someone sees the fixes tag and thinks
> there is a reason it needs to be.
>
> Applied to the togreg branch of iio.git

Haven't checked myself if it's possible, but shouldn;'t we go further
and return dev_err_probe()?

> >       chip_id = FIELD_GET(ADMV1014_CHIP_ID_MSK, chip_id);
> >       if (chip_id != ADMV1014_CHIP_ID) {
> >               dev_err(&spi->dev, "Invalid Chip ID.\n");
> > -             ret = -EINVAL;
> > -             return ret;
> > +             return -EINVAL;
> >       }


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ