diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-10 07:36:26 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-07 07:36:01 -0400 |
commit | de8cc234a517b61c9a8450a34408dbae53aa171f (patch) | |
tree | e7ea3d1916a53fe131e8b3b1e5368a91c8e3c03f /drivers/spi/spi-atmel.c | |
parent | d0e639c9e06d44e713170031fe05fb60ebe680af (diff) |
spi: atmel: Fix incorrect error path
'irq' was not released when clk_prepare_enable failed.
Fix it.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-atmel.c')
-rw-r--r-- | drivers/spi/spi-atmel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index fd7cc566095a..d4ac60b4a56e 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -1583,7 +1583,7 @@ static int atmel_spi_probe(struct platform_device *pdev) | |||
1583 | /* Initialize the hardware */ | 1583 | /* Initialize the hardware */ |
1584 | ret = clk_prepare_enable(clk); | 1584 | ret = clk_prepare_enable(clk); |
1585 | if (ret) | 1585 | if (ret) |
1586 | goto out_unmap_regs; | 1586 | goto out_free_irq; |
1587 | spi_writel(as, CR, SPI_BIT(SWRST)); | 1587 | spi_writel(as, CR, SPI_BIT(SWRST)); |
1588 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ | 1588 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ |
1589 | if (as->caps.has_wdrbt) { | 1589 | if (as->caps.has_wdrbt) { |
@@ -1614,6 +1614,7 @@ out_free_dma: | |||
1614 | spi_writel(as, CR, SPI_BIT(SWRST)); | 1614 | spi_writel(as, CR, SPI_BIT(SWRST)); |
1615 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ | 1615 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ |
1616 | clk_disable_unprepare(clk); | 1616 | clk_disable_unprepare(clk); |
1617 | out_free_irq: | ||
1617 | free_irq(irq, master); | 1618 | free_irq(irq, master); |
1618 | out_unmap_regs: | 1619 | out_unmap_regs: |
1619 | iounmap(as->regs); | 1620 | iounmap(as->regs); |