Commit 77a0989b authored by Zhen Lei's avatar Zhen Lei Committed by Kalle Valo
Browse files

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: 61e115a5 ("[SSB]: add Sonics Silicon Backplane bus support")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Acked-by: default avatarMichael Büsch <m@bues.ch>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210515072949.7151-1-thunder.leizhen@huawei.com
parent 7557dfde
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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) {