Commit de8cc234a517b61c9a8450a34408dbae53aa171f
Committed by
Mark Brown
1 parent
d0e639c9e0
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
drivers/spi/spi-atmel.c
... | ... | @@ -1583,7 +1583,7 @@ |
1583 | 1583 | /* Initialize the hardware */ |
1584 | 1584 | ret = clk_prepare_enable(clk); |
1585 | 1585 | if (ret) |
1586 | - goto out_unmap_regs; | |
1586 | + goto out_free_irq; | |
1587 | 1587 | spi_writel(as, CR, SPI_BIT(SWRST)); |
1588 | 1588 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ |
1589 | 1589 | if (as->caps.has_wdrbt) { |
... | ... | @@ -1614,6 +1614,7 @@ |
1614 | 1614 | spi_writel(as, CR, SPI_BIT(SWRST)); |
1615 | 1615 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ |
1616 | 1616 | clk_disable_unprepare(clk); |
1617 | +out_free_irq: | |
1617 | 1618 | free_irq(irq, master); |
1618 | 1619 | out_unmap_regs: |
1619 | 1620 | iounmap(as->regs); |