[PATCH] spi: zynq-qspi: Add check for clk_enable()

Mark Brown broonie at kernel.org
Mon Dec 9 05:03:53 PST 2024


On Fri, Dec 06, 2024 at 08:32:58PM -0500, Mingwei Zheng wrote:

> -	clk_enable(qspi->refclk);
> -	clk_enable(qspi->pclk);
> +	ret = clk_enable(qspi->refclk);
> +	if (ret)
> +		return ret;
> +
> +	ret = clk_enable(qspi->pclk);
> +	if (ret)
> +		return ret;

The second check leaks the first enable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241209/68497a03/attachment.sig>


More information about the linux-arm-kernel mailing list