Fix incorrect logic in gpiochip_irqchip_add_key(). A driver needs to override both irq_request_resources and irq_request_resources, otherwise gpiochip_irq_reqres and gpiochip_irq_relres should be used. Signed-off-by: Chris Lesiak <chris.lesiak@xxxxxxxxx> --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index bdd68ff197dc..3e441879fea7 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1831,7 +1831,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip, * It is possible for a driver to override this, but only if the * alternative functions are both implemented. */ - if (!irqchip->irq_request_resources && + if (!irqchip->irq_request_resources || !irqchip->irq_release_resources) { irqchip->irq_request_resources = gpiochip_irq_reqres; irqchip->irq_release_resources = gpiochip_irq_relres; -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html