]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: wlan-ng: ensure error return is actually returned
authorColin Ian King <colin.king@canonical.com>
Tue, 14 Jan 2020 18:16:04 +0000 (18:16 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 May 2020 20:19:28 +0000 (21:19 +0100)
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>
drivers/staging/wlan-ng/prism2mgmt.c

index d110b362c3bd27b3f0695f6e499bb0321db6f96c..68465e7343efe6ca84f42da15a30d2ee754bf77d 100644 (file)
@@ -939,7 +939,7 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
                }
        }
 
-       return 0;
+       return result;
 }
 
 /*----------------------------------------------------------------