]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8712: r8712_setMacAddr_cmd(): Change return type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Thu, 20 Jun 2019 11:53:04 +0000 (17:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2019 12:47:29 +0000 (14:47 +0200)
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 <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_cmd.c
drivers/staging/rtl8712/rtl871x_cmd.h

index 9832230ba0b8bc1ab079227489c8fa1afe652ea8..cc55fa5bd494b1fa78a82beb5dec1be95317668d 100644 (file)
@@ -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) {
                kfree(ph2c);
-               return _FAIL;
+               return;
        }
        init_h2fwcmd_w_parm_no_rsp(ph2c, psetMacAddr_para,
                                   _SetMacAddress_CMD_);
        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)
index 814659d5d755ba8f11c0c2bf18bdae6832772890..d9aab41c0299c7e8c5105d73b10a3673df471684 100644 (file)
@@ -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);