projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
watchdog: Orion: Fix possible null-deference in orion_wdt_probe
[cascardo/linux.git]
/
drivers
/
watchdog
/
orion_wdt.c
diff --git
a/drivers/watchdog/orion_wdt.c
b/drivers/watchdog/orion_wdt.c
index
0478b00
..
7c18b3b
100644
(file)
--- a/
drivers/watchdog/orion_wdt.c
+++ b/
drivers/watchdog/orion_wdt.c
@@
-156,6
+156,8
@@
static int orion_wdt_probe(struct platform_device *pdev)
wdt_tclk = clk_get_rate(clk);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -ENODEV;
wdt_reg = devm_ioremap(&pdev->dev, res->start, resource_size(res));
if (!wdt_reg)
return -ENOMEM;