]> git.baikalelectronics.ru Git - kernel.git/commit
block/bsg-lib: use PTR_ERR_OR_ZERO to simplify the flow path
authorzhong jiang <zhongjiang@huawei.com>
Tue, 31 Jul 2018 16:13:14 +0000 (00:13 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Aug 2018 15:13:03 +0000 (09:13 -0600)
commit503fbaed85313e83f2e408cc083310ece7d06f24
treef914b33624a7650377e265e68eb34bde3c35983a
parent88c065a71c8f85bb6f3c58ac8b576dbd29a4b16f
block/bsg-lib: use PTR_ERR_OR_ZERO to simplify the flow path

Simplify the code by using the PTR_ERR_OR_ZERO, instead of the
open code. It is better.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bsg-lib.c