This is a note to let you know that I've just added the patch titled mailbox: th1520: Fix a NULL vs IS_ERR() bug to the 6.13-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: mailbox-th1520-fix-a-null-vs-is_err-bug.patch and it can be found in the queue-6.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 0c0a28b6ee86e44b26d59116ff0fead240700cec Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Date: Sat Nov 30 13:07:39 2024 +0300 mailbox: th1520: Fix a NULL vs IS_ERR() bug [ Upstream commit d0f98e14c010bcf27898b635a54c1994ac4110a8 ] The devm_ioremap() function doesn't return error pointers, it returns NULL. Update the error checking to match. Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Reviewed-by: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx> Signed-off-by: Jassi Brar <jassisinghbrar@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/mailbox/mailbox-th1520.c b/drivers/mailbox/mailbox-th1520.c index 4e84640ac3b87..e16e7c85ee3cd 100644 --- a/drivers/mailbox/mailbox-th1520.c +++ b/drivers/mailbox/mailbox-th1520.c @@ -387,8 +387,10 @@ static void __iomem *th1520_map_mmio(struct platform_device *pdev, mapped = devm_ioremap(&pdev->dev, res->start + offset, resource_size(res) - offset); - if (IS_ERR(mapped)) + if (!mapped) { dev_err(&pdev->dev, "Failed to map resource: %s\n", res_name); + return ERR_PTR(-ENOMEM); + } return mapped; }