From: Nuno Sa <nuno.sa@xxxxxxxxxx> If the keypad is configured, it also depends on the presence of an interrupt. With commit dc748812fca0 ("Input: adp5588-keys - add support for pure gpio"), having an interrupt is no longer mandatory so better check for it when it is indeed mandatory. Signed-off-by: Nuno Sa <nuno.sa@xxxxxxxxxx> --- drivers/input/keyboard/adp5588-keys.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index 11a70ee18482..0152e4fa088c 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c @@ -680,6 +680,11 @@ static int adp5588_fw_parse(struct adp5588_kpad *kpad) return 0; } + if (!client->irq) { + dev_err(&client->dev, "Keypad configured but no IRQ present\n"); + return -EINVAL; + } + ret = matrix_keypad_parse_properties(&client->dev, &kpad->rows, &kpad->cols); if (ret) -- 2.46.1