diff options
Diffstat (limited to 'drivers/input/misc/soc_button_array.c')
-rw-r--r-- | drivers/input/misc/soc_button_array.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index f210a3322559..e37d37273182 100644 --- a/drivers/input/misc/soc_button_array.c +++ b/drivers/input/misc/soc_button_array.c @@ -320,9 +320,10 @@ static int soc_button_probe(struct platform_device *pdev) button_info = (struct soc_button_info *)id->driver_data; } - if (gpiod_count(dev, NULL) <= 0) { + error = gpiod_count(dev, NULL); + if (error < 0) { dev_dbg(dev, "no GPIO attached, ignoring...\n"); - return -ENODEV; + return error; } priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); |