Message ID | 1291142663-1011-4-git-send-email-juhosg@openwrt.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 5275c9e..9636c2f 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -114,8 +114,8 @@ static int __devinit gpio_keys_polled_probe(struct platform_device *pdev) int error; int i; - if (!pdata) - return -ENXIO; + if (!pdata || !pdata->poll_interval) + return -EINVAL; bdev = kzalloc(sizeof(struct gpio_keys_polled_dev) + pdata->nbuttons * sizeof(struct gpio_keys_button_data),