]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ssb: Fix error return code in ssb_bus_scan()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 15 May 2021 07:29:49 +0000 (15:29 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 15 Jun 2021 10:10:42 +0000 (13:10 +0300)
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
drivers/ssb/scan.c

index f49ab1aa2149ab28213eed3639804d117ce15ea5..4161e5d1f276e11af68128fcc9edf9a2f8169c28 100644 (file)
@@ -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) {