projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e278d5e
)
hwmon: fix a NULL vs IS_ERR_OR_NULL() check in xgene_hwmon_probe()
author
Xinghuo Chen
<xinghuo.chen@foxmail.com>
Mon, 3 Mar 2025 12:57:33 +0000
(07:57 -0500)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 3 Mar 2025 14:04:34 +0000
(06:04 -0800)
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>
drivers/hwmon/xgene-hwmon.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/xgene-hwmon.c
b/drivers/hwmon/xgene-hwmon.c
index
1e3bd12
..
7087197
100644
(file)
--- 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;