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: <3acc69aceb04667ba34200f54c59b3d160ab2f5d.camel@analog.com>
Date:   Thu, 17 Oct 2019 12:56:33 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "hslester96@...il.com" <hslester96@...il.com>
CC:     "Popa, Stefan Serban" <StefanSerban.Popa@...log.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "jic23@...nel.org" <jic23@...nel.org>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        "pmeerw@...erw.net" <pmeerw@...erw.net>,
        "knaack.h@....de" <knaack.h@....de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: iio: ad9834: add a check for devm_clk_get

On Wed, 2019-10-16 at 22:25 +0800, Chuhong Yuan wrote:
> ad9834_probe misses a check for devm_clk_get and may cause problems.
> Add a check like what ad9832 does to fix it.
> 

This could also use a Fixes tag, but not a big deal.

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@...log.com>

> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>  drivers/staging/iio/frequency/ad9834.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/staging/iio/frequency/ad9834.c
> b/drivers/staging/iio/frequency/ad9834.c
> index 038d6732c3fd..23026978a5a5 100644
> --- a/drivers/staging/iio/frequency/ad9834.c
> +++ b/drivers/staging/iio/frequency/ad9834.c
> @@ -417,6 +417,10 @@ static int ad9834_probe(struct spi_device *spi)
>  	st = iio_priv(indio_dev);
>  	mutex_init(&st->lock);
>  	st->mclk = devm_clk_get(&spi->dev, NULL);
> +	if (IS_ERR(st->mclk)) {
> +		ret = PTR_ERR(st->mclk);
> +		goto error_disable_reg;
> +	}
>  
>  	ret = clk_prepare_enable(st->mclk);
>  	if (ret) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ