[PATCH 5/5] Staging: rtl8192u: ieee80211: Use !x in place of NULL comparison

Dan Carpenter dan.carpenter at oracle.com
Mon May 13 20:35:25 UTC 2019


On Tue, May 14, 2019 at 01:11:21AM +0530, Puranjay Mohan wrote:
> @@ -2856,7 +2856,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
>  		goto done;
>  	}
>  
> -	if (*crypt == NULL || (*crypt)->ops != ops) {
> +	if (!(*crypt) || (*crypt)->ops != ops) {
             ^      ^
Please don't add these parentheses.

>  		struct ieee80211_crypt_data *new_crypt;
>  
>  		ieee80211_crypt_delayed_deinit(ieee, crypt);

regards,
dan carpenter



More information about the devel mailing list