mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 17:30:54 +07:00
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>
This commit is contained in:
parent
d0e639c9e0
commit
de8cc234a5
@ -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 @@ static int atmel_spi_probe(struct platform_device *pdev)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user