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: <CAMRc=Mcbzpw4o28NA-19dtWzwQz-DUYocNrD+0_RqRkCVq=PiQ@mail.gmail.com>
Date:   Mon, 30 Nov 2020 15:30:22 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Michal Simek <michal.simek@...inx.com>
Cc:     linux-iio <linux-iio@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATH v3 3/3] iio: adc: xilinx: use more devres helpers and
 remove remove()

On Mon, Nov 30, 2020 at 3:28 PM Bartosz Golaszewski <brgl@...ev.pl> wrote:
>
> From: Bartosz Golaszewski <bgolaszewski@...libre.com>
>
> In order to simplify resource management and error paths in probe() and
> entirely drop the remove() callback - use devres helpers wherever
> possible. Define devm actions for cancelling the delayed work and
> disabling the clock.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
> ---

[snip]

>
>         /* Set thresholds to min/max */
>         for (i = 0; i < 16; i++) {
> @@ -1334,59 +1353,23 @@ static int xadc_probe(struct platform_device *pdev)
>                 ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
>                         xadc->threshold[i]);
>                 if (ret)
> -                       goto err_free_irq;
> +                       return ret;
>         }
>
>         /* Go to non-buffered mode */
>         xadc_postdisable(indio_dev);
>
> -       ret = iio_device_register(indio_dev);
> +       ret = devm_iio_device_register(dev, indio_dev);
>         if (ret)
> -               goto err_free_irq;
> +               return ret;
>
>         platform_set_drvdata(pdev, indio_dev);
>

Cr*p I was supposed to drop this line...

Jonathan: can you drop it when applying?

Bartosz

[snip]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ