Skip to contentSkip to conversation

ssb: Fix error return code in ssb_bus_scan()

PATCH In review Zhen Lei 3 participants 3 messages May 15, 2021 – Jun 15, 2021 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

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")
---
 drivers/ssb/scan.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ssb/scan.c +1 -0
index f49ab1aa2149ab2..4161e5d1f276e11 100644
@@ -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) {
Signature · 1 line
2.26.0.106.g9fadedd
maintainer Acked-by on v1 1/1
#1 lore raw

drivers/ssb/scan.c int ssb_bus_scan(struct ssb_bus *bus, · line 331

Quoted 11 lines · 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.

drivers/ssb/scan.c +1 -0
@@ -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) {
Signature · 1 line
Michael
#2 lore raw
In reply to Zhen Lei
Quoted 7 lines · Zhen Lei

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")

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

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

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

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