Re: [PATCH 01/21] mtip32xx: Remove redundant null pointer checks in mtip_hw_debugfs_init()

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

 



On 9/3/24 8:43 AM, Li Zetao wrote:
> Since the debugfs_create_dir() never returns a null pointer, checking
> the return value for a null pointer is redundant, and using IS_ERR is
> safe enough.

Sigh, why are we seeing so many odd variants of this recently. If you'd
do a bit of searching upfront, you'd find that these should not be
checked at all rather than changing it from err+null to just an error
pointer check.

So no to this one, please do at least a tiny bit of research first
before blindly making a change based on what some static analyzer told
you.

-- 
Jens Axboe





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux