lkml.org 
[lkml]   [2019]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-10-11 12:54    [W:0.102 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site