[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191011105404.GA4774@kadam>
Date: Fri, 11 Oct 2019 13:54:04 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Wambui Karuga <wambui.karugax@...il.com>
Cc: outreachy-kernel@...glegroups.com, devel@...verdev.osuosl.org,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/4] staging: rtl8723bs: Remove comparisons to NULL in
conditionals
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
Powered by blists - more mailing lists