Skip to content

Commit ae169f8

Browse files
Yang YingliangSasha Levin
authored andcommitted
spi: bcm-qspi: Fix missing clk_disable_unprepare() on error in bcm_qspi_probe()
[ Upstream commit ca9b8f5 ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent adc9c02 commit ae169f8

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
@@ -1266,7 +1266,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
12661266
&qspi->dev_ids[val]);
12671267
if (ret < 0) {
12681268
dev_err(&pdev->dev, "IRQ %s not found\n", name);
1269-
goto qspi_probe_err;
1269+
goto qspi_unprepare_err;
12701270
}
12711271

12721272
qspi->dev_ids[val].dev = qspi;
@@ -1281,7 +1281,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
12811281
if (!num_ints) {
12821282
dev_err(&pdev->dev, "no IRQs registered, cannot init driver\n");
12831283
ret = -EINVAL;
1284-
goto qspi_probe_err;
1284+
goto qspi_unprepare_err;
12851285
}
12861286

12871287
/*
@@ -1332,6 +1332,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
13321332

13331333
qspi_reg_err:
13341334
bcm_qspi_hw_uninit(qspi);
1335+
qspi_unprepare_err:
13351336
clk_disable_unprepare(qspi->clk);
13361337
qspi_probe_err:
13371338
kfree(qspi->dev_ids);

0 commit comments

Comments
 (0)