Skip to content

Commit

Permalink
serial: ifx6x60: free IRQ on error
Browse files Browse the repository at this point in the history
If second request_irq() failed then the first IRQ must be freed in
error handling code.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Dec 1, 2010
1 parent 3c6a483 commit badb953
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/serial/ifx6x60.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
if (ret) {
dev_err(&spi->dev, "Unable to get irq %x",
gpio_to_irq(ifx_dev->gpio.srdy));
goto error_ret6;
goto error_ret7;
}

/* set pm runtime power state and register with power system */
Expand All @@ -1153,6 +1153,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
mrdy_set_low(ifx_dev);
return 0;

error_ret7:
free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), (void *)ifx_dev);
error_ret6:
gpio_free(ifx_dev->gpio.srdy);
error_ret5:
Expand Down

0 comments on commit badb953

Please sign in to comment.