projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
thermal: rcar_thermal: avoid NULL dereference in absence of IRQ resources
[platform/kernel/linux-starfive.git]
/
drivers
/
thermal
/
rcar_thermal.c
diff --git
a/drivers/thermal/rcar_thermal.c
b/drivers/thermal/rcar_thermal.c
index
45fb284
..
e77e630
100644
(file)
--- a/
drivers/thermal/rcar_thermal.c
+++ b/
drivers/thermal/rcar_thermal.c
@@
-598,7
+598,7
@@
static int rcar_thermal_probe(struct platform_device *pdev)
enr_bits |= 3 << (i * 8);
}
- if (enr_bits)
+ if (
common->base &&
enr_bits)
rcar_thermal_common_write(common, ENR, enr_bits);
dev_info(dev, "%d sensor probed\n", i);