Patch "hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()" has been added to the 6.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()

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:
     hwmon-fix-a-null-vs-is_err_or_null-check-in-xgene_hw.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 a3533819bc031a0bebd0d00fcf21e35dad4c7b8b
Author: Xinghuo Chen <xinghuo.chen@xxxxxxxxxxx>
Date:   Mon Mar 3 07:57:33 2025 -0500

    hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()
    
    [ Upstream commit 10fce7ebe888fa8c97eee7e317a47e7603e5e78d ]
    
    The devm_memremap() function returns error pointers on error,
    it doesn't return NULL.
    
    Fixes: c7cefce03e69 ("hwmon: (xgene) access mailbox as RAM")
    Signed-off-by: Xinghuo Chen <xinghuo.chen@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/tencent_9AD8E7683EC29CAC97496B44F3F865BA070A@xxxxxx
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 1e3bd129a922d..7087197383c96 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -706,7 +706,7 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
 			goto out;
 		}
 
-		if (!ctx->pcc_comm_addr) {
+		if (IS_ERR_OR_NULL(ctx->pcc_comm_addr)) {
 			dev_err(&pdev->dev,
 				"Failed to ioremap PCC comm region\n");
 			rc = -ENOMEM;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux