aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-01-14 18:16:04 +0000
committerBen Hutchings <ben@decadent.org.uk>2020-05-22 21:19:28 +0100
commit4fde93cb457e2864a95c275a5abee82c87057ec5 (patch)
tree6b873d4cb5624a51404b6cffc84e2ef1e6d30dc3
parent583b1fe340caf1eb35c3f65e9fd7c7b03b69c1af (diff)
downloadlinux-stable-4fde93cb457e2864a95c275a5abee82c87057ec5.tar.gz
staging: wlan-ng: ensure error return is actually returned
commit 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 upstream. Currently when the call to prism2sta_ifst fails a netdev_err error is reported, error return variable result is set to -1 but the function always returns 0 for success. Fix this by returning the error value in variable result rather than 0. Addresses-Coverity: ("Unused value") Fixes: 00b3ed168508 ("Staging: add wlan-ng prism2 usb driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/staging/wlan-ng/prism2mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index d110b362c3bd2..68465e7343efe 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -939,7 +939,7 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
}
}
- return 0;
+ return result;
}
/*----------------------------------------------------------------