From: Dan Carpenter <dan.carpenter@oracle.com>
To: Wambui Karuga <wambui.karugax@gmail.com>
Cc: devel@driverdev.osuosl.org, outreachy-kernel@googlegroups.com,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH v3 1/4] staging: rtl8723bs: Remove comparisons to NULL in conditionals
Date: Fri, 11 Oct 2019 13:54:04 +0300 [thread overview]
Message-ID: <20191011105404.GA4774@kadam> (raw)
In-Reply-To: <f4752d3a49e02193ed7b47a353e18e56d94b5a68.1570712632.git.wambui.karugax@gmail.com>
On Thu, Oct 10, 2019 at 04:15:29PM +0300, Wambui Karuga wrote:
> psetauthparm = rtw_zmalloc(sizeof(struct setauth_parm));
> - if (psetauthparm == NULL) {
> - kfree(pcmd);
> + if (!psetauthparm) {
> + kfree((unsigned char *)pcmd);
This new cast is unnecessary and weird.
> res = _FAIL;
> goto exit;
> }
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2019-10-11 10:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 13:15 [PATCH v3 0/4] staging: rtl8723bs: Style clean-up in rtw_mlme.c Wambui Karuga
2019-10-10 13:15 ` [PATCH v3 1/4] staging: rtl8723bs: Remove comparisons to NULL in conditionals Wambui Karuga
2019-10-11 10:54 ` Dan Carpenter [this message]
2019-10-11 12:07 ` Greg KH
2019-10-11 12:08 ` Greg KH
2019-10-11 17:32 ` [Outreachy kernel] " Wambui Karuga
2019-10-10 13:15 ` [PATCH v3 2/4] staging: rtl8723bs: Remove unnecessary braces for single statements Wambui Karuga
2019-10-10 13:15 ` [PATCH v3 3/4] staging: rtl8723bs: Remove comparisons to booleans in conditionals Wambui Karuga
2019-10-10 13:15 ` [PATCH v3 4/4] staging: rtl8723bs: Remove unnecessary blank lines Wambui Karuga
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=20191011105404.GA4774@kadam \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=wambui.karugax@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;
as well as URLs for NNTP newsgroup(s).