diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-10 13:36:26 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-07 13:36:01 +0200 |
commit | de8cc234a517b61c9a8450a34408dbae53aa171f (patch) | |
tree | e7ea3d1916a53fe131e8b3b1e5368a91c8e3c03f /drivers/spi/spi-atmel.c | |
parent | Linux 3.12-rc4 (diff) | |
download | linux-de8cc234a517b61c9a8450a34408dbae53aa171f.tar.xz linux-de8cc234a517b61c9a8450a34408dbae53aa171f.zip |
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) /* Initialize the hardware */ ret = clk_prepare_enable(clk); if (ret) - goto out_unmap_regs; + goto out_free_irq; spi_writel(as, CR, SPI_BIT(SWRST)); spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ if (as->caps.has_wdrbt) { @@ -1614,6 +1614,7 @@ out_free_dma: spi_writel(as, CR, SPI_BIT(SWRST)); spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ clk_disable_unprepare(clk); +out_free_irq: free_irq(irq, master); out_unmap_regs: iounmap(as->regs); |