From: Nishka Dasgupta <nishkadg.linux@gmail.com>
To: larry.finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
gregkh@linuxfoundation.org, straube.linux@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Nishka Dasgupta <nishkadg.linux@gmail.com>
Subject: [PATCH] staging: rtl8712: Change _SUCCESS/_FAIL to 0/-ENOMEM
Date: Fri, 31 May 2019 02:36:38 +0530 [thread overview]
Message-ID: <20190530210638.30343-1-nishkadg.linux@gmail.com> (raw)
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@gmail.com>
---
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
next reply other threads:[~2019-05-30 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 21:06 Nishka Dasgupta [this message]
2019-06-03 12:20 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190530210638.30343-1-nishkadg.linux@gmail.com \
--to=nishkadg.linux@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=larry.finger@lwfinger.net \
--cc=linux-kernel@vger.kernel.org \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome