Change return values _SUCCESS and _FAIL to 0 and -ENOMEM respectively, to match the convention in the drivers (and also because the return value of this changed function is never checked anyway). Change return type of the function to int (from u8) to allow the return of -ENOMEM. Signed-off-by: Nishka Dasgupta <nishkadg.linux@xxxxxxxxx> --- drivers/staging/rtl8712/rtl871x_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index 8220829b5c82..e408b15102ce 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -773,7 +773,7 @@ u8 r8712_addbareq_cmd(struct _adapter *padapter, u8 tid) return _SUCCESS; } -u8 r8712_wdg_timeout_handler(struct _adapter *padapter) +int r8712_wdg_timeout_handler(struct _adapter *padapter) { struct cmd_obj *ph2c; struct drvint_cmd_parm *pdrvintcmd_param; @@ -781,18 +781,18 @@ u8 r8712_wdg_timeout_handler(struct _adapter *padapter) ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC); if (!ph2c) - return _FAIL; + return -ENOMEM; pdrvintcmd_param = kmalloc(sizeof(*pdrvintcmd_param), GFP_ATOMIC); if (!pdrvintcmd_param) { kfree(ph2c); - return _FAIL; + return -ENOMEM; } pdrvintcmd_param->i_cid = WDG_WK_CID; pdrvintcmd_param->sz = 0; pdrvintcmd_param->pbuf = NULL; init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvintcmd_param, _DRV_INT_CMD_); r8712_enqueue_cmd_ex(pcmdpriv, ph2c); - return _SUCCESS; + return 0; } void r8712_survey_cmd_callback(struct _adapter *padapter, struct cmd_obj *pcmd) -- 2.19.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel