From 1c649f4c8649050947b67358467b839e950abd14 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Tue, 11 Nov 2014 09:08:43 +0100 Subject: [PATCH] gpio: mcp23s08: Do not free unrequested interrupt If devm_request_threaded_irq fails for some reason we call mcp23s08_irq_teardown afterwards. Do not free the unrequested interrupt in this case. free_irq can also be omitted for the error free case because we use devm_request_threaded_irq. Signed-off-by: Alexander Stein Signed-off-by: Linus Walleij --- drivers/gpio/gpio-mcp23s08.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index 468d10d2ac1e..1ac7de85da8b 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -514,8 +514,6 @@ static void mcp23s08_irq_teardown(struct mcp23s08 *mcp) { unsigned int irq, i; - free_irq(mcp->irq, mcp); - for (i = 0; i < mcp->chip.ngpio; i++) { irq = irq_find_mapping(mcp->irq_domain, i); if (irq > 0) -- 2.39.5