Re: [PATCH] block: loop: check error using IS_ERR instead of IS_ERR_OR_NULL in loop_add()

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

 



On 12/16/18 2:35 AM, Chengguang Xu wrote:
> blk_mq_init_queue() will not return NULL pointer to its caller,
> so it's better to replace IS_ERR_OR_NULL using IS_ERR in loop_add().
> 
> If in the future things change to check NULL pointer inside loop_add(),
> we should return -ENOMEM as return code instead of PTR_ERR(NULL).

That won't change, I really dislike functions that return NULL if
they also return an ERR_PTR.

Applied, thanks.

-- 
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