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

This Linux kernel change "staging: rtl8712: r8712_setMacAddr_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:04 2019 +0530. The commit for this change in Linux stable tree is 2f1539b (patch).

staging: rtl8712: r8712_setMacAddr_cmd(): Change return type

Change return type of function r8712_setMacAddr_cmd() 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 9832230..cc55fa5 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -690,7 +690,7 @@ u8 r8712_setrttbl_cmd(struct _adapter *padapter,
    return _SUCCESS;

-u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr)
+void r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr)
    struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
    struct cmd_obj *ph2c;
@@ -698,17 +698,16 @@ u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr)

    ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
    if (!ph2c)
-       return _FAIL;
+       return;
    psetMacAddr_para = kmalloc(sizeof(*psetMacAddr_para), GFP_ATOMIC);
    if (!psetMacAddr_para) {
-       return _FAIL;
+       return;
    init_h2fwcmd_w_parm_no_rsp(ph2c, psetMacAddr_para,
    ether_addr_copy(psetMacAddr_para->MacAddr, mac_addr);
    r8712_enqueue_cmd(pcmdpriv, ph2c);
-   return _SUCCESS;

 u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr)
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h
index 814659d..d9aab41 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.h
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h
@@ -708,7 +708,7 @@ struct DisconnectCtrlEx_param {
 #define H2C_CMD_OVERFLOW       0x06
 #define H2C_RESERVED           0x07

-u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr);
+void r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr);
 u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr);
 u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
            struct ndis_802_11_ssid *pssid);

Leave a Reply

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