Skip to content

Commit ca9b8f5

Browse files
Yang Yingliangbroonie
authored andcommitted
spi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe()
Fix the missing clk_disable_unprepare() before return from bcm_qspi_probe() in the error handling case. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3340ec4 commit ca9b8f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/spi/spi-bcm-qspi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
16021602
&qspi->dev_ids[val]);
16031603
if (ret < 0) {
16041604
dev_err(&pdev->dev, "IRQ %s not found\n", name);
1605-
goto qspi_probe_err;
1605+
goto qspi_unprepare_err;
16061606
}
16071607

16081608
qspi->dev_ids[val].dev = qspi;
@@ -1617,7 +1617,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
16171617
if (!num_ints) {
16181618
dev_err(&pdev->dev, "no IRQs registered, cannot init driver\n");
16191619
ret = -EINVAL;
1620-
goto qspi_probe_err;
1620+
goto qspi_unprepare_err;
16211621
}
16221622

16231623
bcm_qspi_hw_init(qspi);
@@ -1641,6 +1641,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
16411641

16421642
qspi_reg_err:
16431643
bcm_qspi_hw_uninit(qspi);
1644+
qspi_unprepare_err:
16441645
clk_disable_unprepare(qspi->clk);
16451646
qspi_probe_err:
16461647
kfree(qspi->dev_ids);

0 commit comments

Comments
 (0)