linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Zhihao Cheng <chengzhihao1@huawei.com>,
	broonie@kernel.org, tudor.ambarus@microchip.com,
	vadivel.muruganx.ramuthevar@linux.intel.com, vigneshr@ti.com
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	yi.zhang@huawei.com
Subject: Re: [PATCH] spi: cadence-quadspi: Fix error return code in cqspi_probe
Date: Mon, 16 Nov 2020 15:11:12 +0100	[thread overview]
Message-ID: <ed042bbef3432805de6f3bb745286b3823c80d6a.camel@pengutronix.de> (raw)
In-Reply-To: <20201116141014.2364260-1-chengzhihao1@huawei.com>

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@huawei.com>
> Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.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

      reply	other threads:[~2020-11-16 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 14:10 [PATCH] spi: cadence-quadspi: Fix error return code in cqspi_probe Zhihao Cheng
2020-11-16 14:11 ` Philipp Zabel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed042bbef3432805de6f3bb745286b3823c80d6a.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=broonie@kernel.org \
    --cc=chengzhihao1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=tudor.ambarus@microchip.com \
    --cc=vadivel.muruganx.ramuthevar@linux.intel.com \
    --cc=vigneshr@ti.com \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).