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

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

staging: rtl8712: r8712_set_chplan_cmd(): Change return type

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 <>
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 74a3517..a17a355 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -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) {
-       return _FAIL;
+       return;
    init_h2fwcmd_w_parm_no_rsp(ph2c, psetchplanpara,
    psetchplanpara->ChannelPlan = chplan;
    r8712_enqueue_cmd(pcmdpriv, ph2c);
-   return _SUCCESS;

 u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset)
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h
index 2e30c35..4459402 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.h
+++ b/drivers/staging/rtl8712/rtl871x_cmd.h
@@ -720,7 +720,7 @@ int r8712_joinbss_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);

Leave a Reply

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