提交 badb9533 编写于 作者: V Vasiliy Kulikov 提交者: Greg Kroah-Hartman

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: NVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 3c6a4832
...@@ -1133,7 +1133,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) ...@@ -1133,7 +1133,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
if (ret) { if (ret) {
dev_err(&spi->dev, "Unable to get irq %x", dev_err(&spi->dev, "Unable to get irq %x",
gpio_to_irq(ifx_dev->gpio.srdy)); gpio_to_irq(ifx_dev->gpio.srdy));
goto error_ret6; goto error_ret7;
} }
/* set pm runtime power state and register with power system */ /* 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,6 +1153,8 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
mrdy_set_low(ifx_dev); mrdy_set_low(ifx_dev);
return 0; return 0;
error_ret7:
free_irq(gpio_to_irq(ifx_dev->gpio.reset_out), (void *)ifx_dev);
error_ret6: error_ret6:
gpio_free(ifx_dev->gpio.srdy); gpio_free(ifx_dev->gpio.srdy);
error_ret5: error_ret5:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册