2021-05-15 11:09:22

by Zhen Lei

[permalink] [raw]
Subject: [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan()

Fix to return -EINVAL from the error handling case instead of 0, as done
elsewhere in this function.

Fixes: 61e115a56d1a ("[SSB]: add Sonics Silicon Backplane bus support")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhen Lei <[email protected]>
---
drivers/ssb/scan.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index f49ab1aa2149ab2..4161e5d1f276e11 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -325,6 +325,7 @@ int ssb_bus_scan(struct ssb_bus *bus,
if (bus->nr_devices > ARRAY_SIZE(bus->devices)) {
pr_err("More than %d ssb cores found (%d)\n",
SSB_MAX_NR_CORES, bus->nr_devices);
+ err = -EINVAL;
goto err_unmap;
}
if (bus->bustype == SSB_BUSTYPE_SSB) {
--
2.26.0.106.g9fadedd




2021-05-15 22:20:16

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan()

On Sat, 15 May 2021 15:29:49 +0800
Zhen Lei <[email protected]> wrote:

> Fix to return -EINVAL from the error handling case instead of 0, as done
> elsewhere in this function.

> @@ -325,6 +325,7 @@ int ssb_bus_scan(struct ssb_bus *bus,
> if (bus->nr_devices > ARRAY_SIZE(bus->devices)) {
> pr_err("More than %d ssb cores found (%d)\n",
> SSB_MAX_NR_CORES, bus->nr_devices);
> + err = -EINVAL;
> goto err_unmap;
> }
> if (bus->bustype == SSB_BUSTYPE_SSB) {


Acked-by: Michael Büsch <[email protected]>

--
Michael


Attachments:
(No filename) (849.00 B)
OpenPGP digital signature

2021-06-15 10:13:03

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan()

Zhen Lei <[email protected]> wrote:

> Fix to return -EINVAL from the error handling case instead of 0, as done
> elsewhere in this function.
>
> Fixes: 61e115a56d1a ("[SSB]: add Sonics Silicon Backplane bus support")
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zhen Lei <[email protected]>
> Acked-by: Michael Büsch <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

77a0989baa42 ssb: Fix error return code in ssb_bus_scan()

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches