staging: rtl8712: r8712_disassoc_cmd(): Change type to void [Linux 5.3]

This Linux kernel change "staging: rtl8712: r8712_disassoc_cmd(): Change type to void" is included in the Linux 5.3 release. This change is authored by Nishka Dasgupta <nishkadg.linux [at]> on Thu Jun 20 17:23:01 2019 +0530. The commit for this change in Linux stable tree is c24d83e (patch).

staging: rtl8712: r8712_disassoc_cmd(): Change type to void

Change return type of function r8712_disassoc_cmd from u8 to void as its
return value is never stored, checked or otherwise used. Modify its
return statements accordingly.

Signed-off-by: Nishka Dasgupta <>
Signed-off-by: Greg Kroah-Hartman <>

There are 9 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++----
 drivers/staging/rtl8712/rtl871x_cmd.h | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index a17a355..c1d032d 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -564,7 +564,7 @@ int r8712_joinbss_cmd(struct _adapter  *padapter, struct wlan_network *pnetwork)
    return 0;

-u8 r8712_disassoc_cmd(struct _adapter *padapter) /* for sta_mode */
+void r8712_disassoc_cmd(struct _adapter *padapter) /* for sta_mode */
    struct cmd_obj *pdisconnect_cmd;
    struct disconnect_parm *pdisconnect;
@@ -572,16 +572,15 @@ u8 r8712_disassoc_cmd(struct _adapter *padapter) /* for sta_mode */

    pdisconnect_cmd = kmalloc(sizeof(*pdisconnect_cmd), GFP_ATOMIC);
    if (!pdisconnect_cmd)
-       return _FAIL;
+       return;
    pdisconnect = kmalloc(sizeof(*pdisconnect), GFP_ATOMIC);
    if (!pdisconnect) {
-       return _FAIL;
+       return;
    init_h2fwcmd_w_parm_no_rsp(pdisconnect_cmd, pdisconnect,
    r8712_enqueue_cmd(pcmdpriv, pdisconnect_cmd);
-   return _SUCCESS;

 u8 r8712_setopmode_cmd(struct _adapter *padapter,
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h
index 4459402..9ad364f 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.h
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h
@@ -716,7 +716,7 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
 u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
 int r8712_joinbss_cmd(struct _adapter *padapter,
              struct wlan_network *pnetwork);
-u8 r8712_disassoc_cmd(struct _adapter *padapter);
+void r8712_disassoc_cmd(struct _adapter *padapter);
 u8 r8712_setopmode_cmd(struct _adapter *padapter,
         enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
 int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset);

Leave a Reply

Your email address will not be published. Required fields are marked *