From: Colin Ian King Date: Tue, 14 Jan 2020 18:16:04 +0000 (+0000) Subject: staging: wlan-ng: ensure error return is actually returned X-Git-Tag: v5.6-rc1~138^2~104 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cc41cbce536876678b35e03c4a8a7bb72c78fa9;p=thirdparty%2Flinux.git staging: wlan-ng: ensure error return is actually returned 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 Cc: stable Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 7350fe5d96a34..a8860d2aee683 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; } /*----------------------------------------------------------------