aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ath79.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-ath79.c')
-rw-r--r--drivers/gpio/gpio-ath79.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index 3ae7c1876bf4..684e9d6d6623 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -258,6 +258,8 @@ static int ath79_gpio_probe(struct platform_device *pdev)
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -EINVAL;
ctrl->base = devm_ioremap_nocache(
&pdev->dev, res->start, resource_size(res));
if (!ctrl->base)