Search Linux Wireless

Re: [PATCH] net: mac80211: use IS_ERR to check return value

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

 



On Sun, 2023-04-16 at 16:30 +0800, yingsha xu wrote:
> According to the annotation of function debugfs_create_fs, if
> an error occurs, ERR_PTR(-ERROR) will be returned instead of
> a null pointer or zero value.
> 
> Fix it by using IS_ERR().

I don't this this is right, or fixed anything ...

If debugfs indeed returned an ERR_PTR() value, then the later debugfs
adds will do nothing.

Since it doesn't look like debugfs_create_dir() can actually return NULL
these days (not sure it ever could), I guess we can even remove the
check.

But you could've just read the comment there too, to know what the NULL
check was about ...

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