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] [day] [month] [year] [list]
Message-ID: <20170528155041.478fc87b@kernel.org>
Date:   Sun, 28 May 2017 15:50:41 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>
Cc:     knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
        soren.brinkmann@...inx.com, linux-iio@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: xilinx: Handle return value of
 clk_prepare_enable

On Fri, 26 May 2017 12:07:41 +0530
Arvind Yadav <arvind.yadav.cs@...il.com> wrote:

> clk_prepare_enable() can fail here and we must check its return value.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
Straight forward looking so I've applied this to the togreg
branch of iio.git and pushed it out as testing for the autobuilders
to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/adc/xilinx-xadc-core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
> index 56cf590..4a60497 100644
> --- a/drivers/iio/adc/xilinx-xadc-core.c
> +++ b/drivers/iio/adc/xilinx-xadc-core.c
> @@ -1204,7 +1204,10 @@ static int xadc_probe(struct platform_device *pdev)
>  		ret = PTR_ERR(xadc->clk);
>  		goto err_free_samplerate_trigger;
>  	}
> -	clk_prepare_enable(xadc->clk);
> +
> +	ret = clk_prepare_enable(xadc->clk);
> +	if (ret)
> +		goto err_free_samplerate_trigger;
>  
>  	ret = xadc->ops->setup(pdev, indio_dev, irq);
>  	if (ret)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ