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-01 09:37:02 +0000 |
| commit | eb808249094182907b40888c40dd064be57284f8 (patch) | |
| tree | 0b1d0e97bcc7ef7a5e3ac1f58df2f3dbd9116827 | |
| parent | 9dab6bbc9462c43001a88ee933a491a1502fa6f5 (diff) | |
| download | linux-eb808249094182907b40888c40dd064be57284f8.tar.gz linux-eb808249094182907b40888c40dd064be57284f8.tar.bz2 linux-eb808249094182907b40888c40dd064be57284f8.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>
| -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 7350fe5d96a3..a8860d2aee68 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -959,7 +959,7 @@ int prism2mgmt_flashdl_state(struct wlandevice *wlandev, void *msgp) } } - return 0; + return result; } /*---------------------------------------------------------------- |
