summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl871x_cmd.h
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-06-20 14:52:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-20 15:47:28 +0300
commit36f484ef094104bb525e50052bc580daa5488763 (patch)
tree6dbe6a646c30e4ef1fdd1221a6e4f9f8b69ab9d5 /drivers/staging/rtl8712/rtl871x_cmd.h
parent97a738d30cb17a327874d8f594d59c69d33c5c37 (diff)
downloadlinux-36f484ef094104bb525e50052bc580daa5488763.tar.xz
staging: rtl8712: r8712_joinbss_cmd(): Change return values and type
Change return values of function r8712_joinbss_cmd from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Change return type from u8 to int to accommodate return of -ENOMEM. Similarly, change the return values (_SUCCESS to 0 and _FAIL to -ENOMEM or -EINVAL) and type (sint to int) of the call site of r8712_joinbss_cmd, r8712_select_and_join_from_scan, as one of the branches of r8712_select_and_join_from_scan directly returns the return value of r8712_joinbss_cmd. Modify the call sites of r8712_select_and_join_from_scan to check for 0 instead of _SUCCESS. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_cmd.h')
-rw-r--r--drivers/staging/rtl8712/rtl871x_cmd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h
index 6ea1bafd8acc..7d4da8ea95ec 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.h
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h
@@ -714,8 +714,8 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
struct ndis_802_11_ssid *pssid);
int r8712_createbss_cmd(struct _adapter *padapter);
u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
-u8 r8712_joinbss_cmd(struct _adapter *padapter,
- struct wlan_network *pnetwork);
+int r8712_joinbss_cmd(struct _adapter *padapter,
+ struct wlan_network *pnetwork);
u8 r8712_disassoc_cmd(struct _adapter *padapter);
u8 r8712_setopmode_cmd(struct _adapter *padapter,
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);