]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()
authorXinghuo Chen <xinghuo.chen@foxmail.com>
Mon, 3 Mar 2025 12:57:33 +0000 (07:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:51:05 +0000 (12:51 +0100)
commite9813e0887fee12100dff7da8876b0594c1809a6
treea9ebb99765929a0771c6a0c7ea8f502d1c319c01
parent9b6f083db141ece0024be01526aa05aa978811cb
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@foxmail.com>
Link: https://lore.kernel.org/r/tencent_9AD8E7683EC29CAC97496B44F3F865BA070A@qq.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/xgene-hwmon.c