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: <ed042bbef3432805de6f3bb745286b3823c80d6a.camel@pengutronix.de>
Date:   Mon, 16 Nov 2020 15:11:12 +0100
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     Zhihao Cheng <chengzhihao1@...wei.com>, broonie@...nel.org,
        tudor.ambarus@...rochip.com,
        vadivel.muruganx.ramuthevar@...ux.intel.com, vigneshr@...com
Cc:     linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
        yi.zhang@...wei.com
Subject: Re: [PATCH] spi: cadence-quadspi: Fix error return code in
 cqspi_probe

Hi Zhihao,

On Mon, 2020-11-16 at 22:10 +0800, Zhihao Cheng wrote:
> Fix to return the error code from
> devm_reset_control_get_optional_exclusive() instaed of 0
> in cqspi_probe().
>
> Fixes: 31fb632b5d43ca ("spi: Move cadence-quadspi driver to drivers/spi/")
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>
> ---
>  drivers/spi/spi-cadence-quadspi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
> index 40938cf3806d..22d7158edb71 100644
> --- a/drivers/spi/spi-cadence-quadspi.c
> +++ b/drivers/spi/spi-cadence-quadspi.c
> @@ -1260,12 +1260,14 @@ static int cqspi_probe(struct platform_device *pdev)
>  	/* Obtain QSPI reset control */
>  	rstc = devm_reset_control_get_optional_exclusive(dev, "qspi");
>  	if (IS_ERR(rstc)) {
> +		ret = PTR_ERR(rstc);
>  		dev_err(dev, "Cannot get QSPI reset.\n");
>  		goto probe_reset_failed;
>  	}
>  
>  	rstc_ocp = devm_reset_control_get_optional_exclusive(dev, "qspi-ocp");
>  	if (IS_ERR(rstc_ocp)) {
> +		ret = PTR_ERR(rstc);

This should be
		ret = PTR_ERR(rstc_ocp);
instead.

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ