summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-palmas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-palmas.c')
-rw-r--r--drivers/gpio/gpio-palmas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
index 171a638..52b447c 100644
--- a/drivers/gpio/gpio-palmas.c
+++ b/drivers/gpio/gpio-palmas.c
@@ -167,6 +167,8 @@ static int palmas_gpio_probe(struct platform_device *pdev)
const struct palmas_device_data *dev_data;
match = of_match_device(of_palmas_gpio_match, &pdev->dev);
+ if (!match)
+ return -ENODEV;
dev_data = match->data;
if (!dev_data)
dev_data = &palmas_dev_data;
OpenPOWER on IntegriCloud