gpio: mcp23s08: Do not free unrequested interrupt
authorAlexander Stein <alexander.stein@systec-electronic.com>
Tue, 11 Nov 2014 08:08:43 +0000 (09:08 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Nov 2014 14:01:19 +0000 (15:01 +0100)
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 <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mcp23s08.c

index 468d10d2ac1e3a8b12ab73a0ec3fb89692b3e577..1ac7de85da8bcf6567a5779601fae1ab07e8724d 100644 (file)
@@ -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)