mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
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: c7cefce03e ("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>
This commit is contained in:
parent
cd1c44327b
commit
7a115f431b
1 changed files with 1 additions and 1 deletions
|
|
@ -719,7 +719,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue