# Re: \[PATCH 1/1\] ssb: Fix error return code in ssb\_bus\_scan()

- From: Michael Büsch \<m@bues.ch\>
- Date: 2021-05-15 14:55:10 
- List: linux-wireless
- Page: https://ratatoskr.run/linux-wireless/2021/05/15767164
- Thread: https://ratatoskr.run/linux-wireless/2021/05/15767157/t.md

```text
On Sat, 15 May 2021 15:29:49 +0800
Zhen Lei [ref] 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
```

## Attachments

- [(unnamed)](https://ratatoskr.run/linux-wireless/2021/05/15767164/attachment/0) (application/pgp-signature, 833 bytes)
