mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
staging: rtl8712: Change return values of r8712_setrfreg_cmd()
Change return values of function r8712_setrfreg_cmd from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Modify call site accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
da8e81205e
commit
a5dedb5c98
3 changed files with 6 additions and 6 deletions
|
|
@ -259,7 +259,7 @@ void r8712_set_chplan_cmd(struct _adapter *padapter, int chplan)
|
|||
r8712_enqueue_cmd(pcmdpriv, ph2c);
|
||||
}
|
||||
|
||||
u8 r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val)
|
||||
int r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val)
|
||||
{
|
||||
struct cmd_obj *ph2c;
|
||||
struct writeRF_parm *pwriterfparm;
|
||||
|
|
@ -267,17 +267,17 @@ u8 r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val)
|
|||
|
||||
ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
|
||||
if (!ph2c)
|
||||
return _FAIL;
|
||||
return -ENOMEM;
|
||||
pwriterfparm = kmalloc(sizeof(*pwriterfparm), GFP_ATOMIC);
|
||||
if (!pwriterfparm) {
|
||||
kfree(ph2c);
|
||||
return _FAIL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
init_h2fwcmd_w_parm_no_rsp(ph2c, pwriterfparm, GEN_CMD_CODE(_SetRFReg));
|
||||
pwriterfparm->offset = offset;
|
||||
pwriterfparm->value = val;
|
||||
r8712_enqueue_cmd(pcmdpriv, ph2c);
|
||||
return _SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval)
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ void r8712_setopmode_cmd(struct _adapter *padapter,
|
|||
int r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset);
|
||||
void r8712_set_chplan_cmd(struct _adapter *padapter, int chplan);
|
||||
u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval);
|
||||
u8 r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val);
|
||||
int r8712_setrfreg_cmd(struct _adapter *padapter, u8 offset, u32 val);
|
||||
void r8712_addbareq_cmd(struct _adapter *padapter, u8 tid);
|
||||
void r8712_wdg_wk_cmd(struct _adapter *padapter);
|
||||
void r8712_survey_cmd_callback(struct _adapter *padapter,
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ uint oid_rt_pro_rf_write_registry_hdl(struct oid_par_priv*
|
|||
return RNDIS_STATUS_NOT_ACCEPTED;
|
||||
if (poid_par_priv->information_buf_len ==
|
||||
(sizeof(unsigned long) * 3)) {
|
||||
if (!r8712_setrfreg_cmd(Adapter,
|
||||
if (r8712_setrfreg_cmd(Adapter,
|
||||
*(unsigned char *)poid_par_priv->information_buf,
|
||||
(unsigned long)(*((unsigned long *)
|
||||
poid_par_priv->information_buf + 2))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue