From: Serge Semin <fancer.lancer@gmail.com>
To: Zhang Changzhong <zhangchangzhong@huawei.com>
Cc: Mark Brown <broonie@kernel.org>,
Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: dw: Fix error return code in dw_spi_bt1_probe()
Date: Sat, 5 Dec 2020 19:25:25 +0300 [thread overview]
Message-ID: <20201205162525.5k35z3b4brdnfjxh@mobilestation> (raw)
In-Reply-To: <1607071357-33378-1-git-send-email-zhangchangzhong@huawei.com>
Hello Zhang
On Fri, Dec 04, 2020 at 04:42:37PM +0800, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Thanks for the patch. Definitely
Acked-by: Serge Semin <fancer.lancer@gmail.com>
-Sergey
> ---
> drivers/spi/spi-dw-bt1.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c
> index f382dfad..c279b78 100644
> --- a/drivers/spi/spi-dw-bt1.c
> +++ b/drivers/spi/spi-dw-bt1.c
> @@ -280,8 +280,10 @@ static int dw_spi_bt1_probe(struct platform_device *pdev)
> dws->bus_num = pdev->id;
> dws->reg_io_width = 4;
> dws->max_freq = clk_get_rate(dwsbt1->clk);
> - if (!dws->max_freq)
> + if (!dws->max_freq) {
> + ret = -EINVAL;
> goto err_disable_clk;
> + }
>
> init_func = device_get_match_data(&pdev->dev);
> ret = init_func(pdev, dwsbt1);
> --
> 2.9.5
>
next prev parent reply other threads:[~2020-12-05 18:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 8:42 [PATCH] spi: dw: Fix error return code in dw_spi_bt1_probe() Zhang Changzhong
2020-12-05 16:25 ` Serge Semin [this message]
2020-12-07 17:22 ` Mark Brown
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=20201205162525.5k35z3b4brdnfjxh@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=Ramil.Zaripov@baikalelectronics.ru \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=zhangchangzhong@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).