summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/gpio/gpio-palmas.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/gpio/gpio-palmas.c')
-rw-r--r--kernel/drivers/gpio/gpio-palmas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/drivers/gpio/gpio-palmas.c b/kernel/drivers/gpio/gpio-palmas.c
index 171a6389f..52b447c07 100644
--- a/kernel/drivers/gpio/gpio-palmas.c
+++ b/kernel/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;