]> git.baikalelectronics.ru Git - kernel.git/commit
n64cart: fix return value check in n64cart_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 9 Sep 2021 09:06:08 +0000 (17:06 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 9 Sep 2021 20:24:02 +0000 (14:24 -0600)
commitc2578544b6f99be079cb1e8305f476e139f131e6
tree87eba00454997fe9e21557a1b89857c94c9dd51c
parent15e0632b7ec4872fa46501038295f650e16b4747
n64cart: fix return value check in n64cart_probe()

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

Fixes: 0e188e085791 ("block: Add n64 cart driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20210909090608.2989716-1-yangyingliang@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/n64cart.c