diff mbox series

marvell wireless: cleanup -- make error values consistent

Message ID 20190724095015.GA6592@amd
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series marvell wireless: cleanup -- make error values consistent | expand

Commit Message

Pavel Machek July 24, 2019, 9:50 a.m. UTC
Surrounding code uses -ERRNO as a result, so don't pass plain -1.

Signed-off-by: Pavel Machek <pavel@denx.de>

Comments

Kalle Valo July 24, 2019, 11:39 a.m. UTC | #1
Pavel Machek <pavel@ucw.cz> wrote:

> Surrounding code uses -ERRNO as a result, so don't pass plain -1.
> 
> Signed-off-by: Pavel Machek <pavel@denx.de>

The title prefix should be "mwifiex:", I'll fix that.
Kalle Valo Aug. 6, 2019, 12:29 p.m. UTC | #2
Pavel Machek <pavel@ucw.cz> writes:

> Surrounding code uses -ERRNO as a result, so don't pass plain -1.
>
> Signed-off-by: Pavel Machek <pavel@denx.de>

For some reason patchwork (or my patchwork script) didn't like this
patch:

Failed to apply the patch: ['git', 'am', '-s', '-3'] failed: 128
Patch is empty. Was it split wrong?

So I applied this manually:

6334dea8880a mwifiex: make error values consistent in mwifiex_update_bss_desc_with_ie()
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index 0d6d417..ddf75a5 100644
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
@@ -1243,7 +1243,7 @@  int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
 			mwifiex_dbg(adapter, ERROR,
 				    "err: InterpretIE: in processing\t"
 				    "IE, bytes left < IE length\n");
-			return -1;
+			return -EINVAL;
 		}
 		switch (element_id) {
 		case WLAN_EID_SSID: