summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/qcom-wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/qcom-wdt.c')
-rw-r--r--drivers/watchdog/qcom-wdt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
index 4f47b5e90956..780971318810 100644
--- a/drivers/watchdog/qcom-wdt.c
+++ b/drivers/watchdog/qcom-wdt.c
@@ -162,6 +162,8 @@ static int qcom_wdt_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -ENOMEM;
/* We use CPU0's DGT for the watchdog */
if (of_property_read_u32(np, "cpu-offset", &percpu_offset))