staging: rtl8712: r8712_setstakey_cmd(): Change return type [Linux 5.3]

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

staging: rtl8712: r8712_setstakey_cmd(): Change return type

Change return type of function r8712_setstakey_cmd() to void as its
return value is never stored, checked, or otherwise used.

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

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

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

diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 48f7d21..9832230 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -604,7 +604,7 @@ void r8712_setopmode_cmd(struct _adapter *padapter,
    r8712_enqueue_cmd(pcmdpriv, ph2c);

-u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
+void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
    struct cmd_obj *ph2c;
    struct set_stakey_parm *psetstakey_para;
@@ -616,17 +616,17 @@ u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)

    ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
    if (!ph2c)
-       return _FAIL;
+       return;
    psetstakey_para = kmalloc(sizeof(*psetstakey_para), GFP_ATOMIC);
    if (!psetstakey_para) {
-       return _FAIL;
+       return;
    psetstakey_rsp = kmalloc(sizeof(*psetstakey_rsp), GFP_ATOMIC);
    if (!psetstakey_rsp) {
-       return _FAIL;
+       return;
    init_h2fwcmd_w_parm_no_rsp(ph2c, psetstakey_para, _SetStaKey_CMD_);
    ph2c->rsp = (u8 *) psetstakey_rsp;
@@ -645,7 +645,6 @@ u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
            psecuritypriv->XGrpKeyid - 1]. skey, 16);
    r8712_enqueue_cmd(pcmdpriv, ph2c);
-   return _SUCCESS;

 u8 r8712_setrfintfs_cmd(struct _adapter *padapter, u8 mode)
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h
index d296ace..814659d 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.h
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h
@@ -713,7 +713,7 @@ struct DisconnectCtrlEx_param {
 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);
+void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
 int r8712_joinbss_cmd(struct _adapter *padapter,
              struct wlan_network *pnetwork);
 void r8712_disassoc_cmd(struct _adapter *padapter);

Leave a Reply

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