* [PATCH] spi: dw: Fix error return code in dw_spi_bt1_probe()
@ 2020-12-04 8:42 Zhang Changzhong
2020-12-05 16:25 ` Serge Semin
2020-12-07 17:22 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Zhang Changzhong @ 2020-12-04 8:42 UTC (permalink / raw)
To: Serge Semin, Mark Brown, Ramil Zaripov
Cc: Zhang Changzhong, linux-spi, linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: dw: Fix error return code in dw_spi_bt1_probe()
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
2020-12-07 17:22 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Serge Semin @ 2020-12-05 16:25 UTC (permalink / raw)
To: Zhang Changzhong; +Cc: Mark Brown, Ramil Zaripov, linux-spi, linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: dw: Fix error return code in dw_spi_bt1_probe()
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
@ 2020-12-07 17:22 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-12-07 17:22 UTC (permalink / raw)
To: Ramil Zaripov, Zhang Changzhong, Serge Semin; +Cc: linux-kernel, linux-spi
On Fri, 4 Dec 2020 16:42:37 +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.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: dw: Fix error return code in dw_spi_bt1_probe()
commit: e748edd9841306908b4e02dddd0afd1aa1f8b973
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-07 17:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-12-07 17:22 ` Mark Brown
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).