summaryrefslogtreecommitdiffstats
path: root/drivers/ssb
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-05-15 09:29:49 +0200
committerKalle Valo <kvalo@codeaurora.org>2021-06-15 12:10:42 +0200
commit77a0989baa427dbd242c5784d05a53ca3d197d43 (patch)
treeb7aed8a1ddbba971f5928d20e17fba95c74dc5b9 /drivers/ssb
parentssb: Remove redundant assignment to err (diff)
downloadlinux-77a0989baa427dbd242c5784d05a53ca3d197d43.tar.xz
linux-77a0989baa427dbd242c5784d05a53ca3d197d43.zip
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 <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Acked-by: Michael Büsch <m@bues.ch> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210515072949.7151-1-thunder.leizhen@huawei.com
Diffstat (limited to 'drivers/ssb')
-rw-r--r--drivers/ssb/scan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index f49ab1aa2149..4161e5d1f276 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) {