diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-01-14 18:16:04 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-05 13:05:36 +0000 |
commit | 797d34e764ea265f5006ec9a485a86c5093923a0 (patch) | |
tree | 9006f628b6f225af8e62da95fdb3794598f8dab9 /drivers/staging | |
parent | 8b6487d85ca9f9bfa9d75917451969a1d097a815 (diff) | |
download | linux-stable-797d34e764ea265f5006ec9a485a86c5093923a0.tar.gz linux-stable-797d34e764ea265f5006ec9a485a86c5093923a0.tar.bz2 linux-stable-797d34e764ea265f5006ec9a485a86c5093923a0.zip |
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>
Cc: stable <stable@vger.kernel.org>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/wlan-ng/prism2mgmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index f815f9d5045f..08e2bbd9772f 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -938,7 +938,7 @@ int prism2mgmt_flashdl_state(struct wlandevice *wlandev, void *msgp) } } - return 0; + return result; } /*---------------------------------------------------------------- |