This is a note to let you know that I've just added the patch titled n64cart: fix return value check in n64cart_probe() to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: n64cart-fix-return-value-check-in-n64cart_probe.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 221e8360834c59f0c9952630fa5904a94ebd2bb8 Mon Sep 17 00:00:00 2001 From: Yang Yingliang <yangyingliang@xxxxxxxxxx> Date: Thu, 9 Sep 2021 17:06:08 +0800 Subject: n64cart: fix return value check in n64cart_probe() From: Yang Yingliang <yangyingliang@xxxxxxxxxx> commit 221e8360834c59f0c9952630fa5904a94ebd2bb8 upstream. 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: d9b2a2bbbb4d ("block: Add n64 cart driver") Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx> Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210909090608.2989716-1-yangyingliang@xxxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/block/n64cart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/block/n64cart.c +++ b/drivers/block/n64cart.c @@ -129,8 +129,8 @@ static int __init n64cart_probe(struct p } reg_base = devm_platform_ioremap_resource(pdev, 0); - if (!reg_base) - return -EINVAL; + if (IS_ERR(reg_base)) + return PTR_ERR(reg_base); disk = blk_alloc_disk(NUMA_NO_NODE); if (!disk) Patches currently in stable-queue which might be from yangyingliang@xxxxxxxxxx are queue-5.14/n64cart-fix-return-value-check-in-n64cart_probe.patch