Skip to content

Commit

Permalink
gpio: mcp23s08: Do not free unrequested interrupt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Stein authored and Linus Walleij committed Nov 27, 2014
1 parent 1fd2b49 commit 1c649f4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/gpio/gpio-mcp23s08.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1c649f4

Please sign in to comment.