linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan()
@ 2021-05-15  7:29 Zhen Lei
  2021-05-15 14:52 ` Michael Büsch
  2021-06-15 10:10 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Zhen Lei @ 2021-05-15  7:29 UTC (permalink / raw)
  To: Michael Buesch, John W . Linville, David S . Miller, linux-wireless
  Cc: 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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan()
  2021-05-15  7:29 [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan() Zhen Lei
@ 2021-05-15 14:52 ` Michael Büsch
  2021-06-15 10:10 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Büsch @ 2021-05-15 14:52 UTC (permalink / raw)
  To: Zhen Lei; +Cc: John W . Linville, David S . Miller, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

On Sat, 15 May 2021 15:29:49 +0800
Zhen Lei <thunder.leizhen@huawei.com> 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 <m@bues.ch>

-- 
Michael

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan()
  2021-05-15  7:29 [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan() Zhen Lei
  2021-05-15 14:52 ` Michael Büsch
@ 2021-06-15 10:10 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-06-15 10:10 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Michael Buesch, John W . Linville, David S . Miller,
	linux-wireless, Zhen Lei

Zhen Lei <thunder.leizhen@huawei.com> 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 <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> Acked-by: Michael Büsch <m@bues.ch>

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/20210515072949.7151-1-thunder.leizhen@huawei.com/

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-15 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15  7:29 [PATCH 1/1] ssb: Fix error return code in ssb_bus_scan() Zhen Lei
2021-05-15 14:52 ` Michael Büsch
2021-06-15 10:10 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).