Re: [PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap

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

 



On Fri, Apr 05, 2019 at 09:53:06PM +0800, Chengguang Xu wrote:
> When allocating dynamic major, the minor range overlap check
> in __register_chrdev_region() will not fail, so actually
> there is no real case to passing non negative error code to
> caller. However, set variable ret to -EBUSY before chekcking
> minor range overlap will avoid false-positive warning from
> code analyzing tool(like Smatch) and also make the code more
> easy to understand.
> 
> Suggested-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
> ---
>  fs/char_dev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

What tree was this patch made against?  I can't seem to apply it
anywhere :(

Please fix up and resend.

thanks,

greg k-h



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux