[PATCH v3 1/4] staging: rtl8723bs: Remove comparisons to NULL in conditionals

Dan Carpenter dan.carpenter at oracle.com
Fri Oct 11 10:54:04 UTC 2019


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


More information about the devel mailing list