Search Linux Wireless

Re: [PATCH] wireless: remove unnecessary condition check before kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2018-09-08 at 22:12 +0800, zhong jiang wrote:
> kfree has taken the null pointer into account. Just remove the
> redundant condition check before kfree.

I'm all for doing that if it actually removes conditionals, but

> -	if (!IS_ERR_OR_NULL(regdb))
> +	if (!IS_ERR(regdb))
>  		kfree(regdb);

this seems rather pointless since there's still a condition. In that
case, I feel it's easier to understand the original code.

johannes



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux