]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: fix return value check in nvmet_subsys_alloc()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 6 Jul 2016 12:02:09 +0000 (12:02 +0000)
committerJens Axboe <axboe@fb.com>
Tue, 12 Jul 2016 15:33:43 +0000 (08:33 -0700)
commit262aac13bd17b301e77c5c93f17f2eb6139af438
treebf8f78689a6ab8ec0c4c064a2ebbcc65bccb1a89
parent0bf8ccc6d0a84f468498a054bed5a1df279bc5e4
nvmet: fix return value check in nvmet_subsys_alloc()

In case of error, the function kstrndup() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/target/core.c