staging: rtl8712: r8712_set_chplan_cmd(): Change return type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Thu, 20 Jun 2019 11:53:00 +0000 (17:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2019 12:47:28 +0000 (14:47 +0200)
Change return type of function r8712_set_chplan_cmd from u8 to void as
its return value is never stored, checked or otherwise used. Change the
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 74a3517..a17a355 100644 (file)
@@ -260,7 +260,7 @@ int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset)
        return 0;
 }
 
-u8 r8712_set_chplan_cmd(struct _adapter *padapter, int chplan)
+void r8712_set_chplan_cmd(struct _adapter *padapter, int chplan)
 {
        struct cmd_obj *ph2c;
        struct SetChannelPlan_param *psetchplanpara;
@@ -268,17 +268,16 @@ u8 r8712_set_chplan_cmd(struct _adapter *padapter, int chplan)
 
        ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (!ph2c)
-               return _FAIL;
+               return;
        psetchplanpara = kmalloc(sizeof(*psetchplanpara), GFP_ATOMIC);
        if (!psetchplanpara) {
                kfree(ph2c);
-               return _FAIL;
+               return;
        }
        init_h2fwcmd_w_parm_no_rsp(ph2c, psetchplanpara,
                                GEN_CMD_CODE(_SetChannelPlan));
        psetchplanpara->ChannelPlan = chplan;
        r8712_enqueue_cmd(pcmdpriv, ph2c);
-       return _SUCCESS;
 }
 
 u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset)
index 2e30c35..4459402 100644 (file)
@@ -720,7 +720,7 @@ u8 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);
-u8 r8712_set_chplan_cmd(struct _adapter  *padapter, int chplan);
+void r8712_set_chplan_cmd(struct _adapter  *padapter, int chplan);
 u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset);
 u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval);
 u8 r8712_setrfintfs_cmd(struct _adapter *padapter, u8 mode);