diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2010-11-19 13:42:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-30 20:25:45 -0500 |
commit | badb9533abbbba70df099765afe4ae432b442430 (patch) | |
tree | 404f47551e7c777fdc02df62437d35cb4aae4413 /drivers/serial/ifx6x60.c | |
parent | 3c6a483275f47a2ef7119309ad3d791c10cf30da (diff) |
serial: ifx6x60: free IRQ on error
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>
Diffstat (limited to 'drivers/serial/ifx6x60.c')
-rw-r--r-- | drivers/serial/ifx6x60.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/serial/ifx6x60.c b/drivers/serial/ifx6x60.c index 803264aba3e3..3f8d5ee90a1b 100644 --- a/drivers/serial/ifx6x60.c +++ b/drivers/serial/ifx6x60.c | |||
@@ -1133,7 +1133,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) | |||
1133 | if (ret) { | 1133 | if (ret) { |
1134 | dev_err(&spi->dev, "Unable to get irq %x", | 1134 | dev_err(&spi->dev, "Unable to get irq %x", |
1135 | gpio_to_irq(ifx_dev->gpio.srdy)); | 1135 | gpio_to_irq(ifx_dev->gpio.srdy)); |
1136 | goto error_ret6; | 1136 | goto error_ret7; |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | /* set pm runtime power state and register with power system */ | 1139 | /* set pm runtime power state and register with power system */ |
@@ -1153,6 +1153,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi) | |||
1153 | mrdy_set_low(ifx_dev); | 1153 | mrdy_set_low(ifx_dev); |
1154 | return 0; | 1154 | return 0; |
1155 | 1155 | ||
1156 | error_ret7: | ||
1157 | free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), (void *)ifx_dev); | ||
1156 | error_ret6: | 1158 | error_ret6: |
1157 | gpio_free(ifx_dev->gpio.srdy); | 1159 | gpio_free(ifx_dev->gpio.srdy); |
1158 | error_ret5: | 1160 | error_ret5: |