Skip to content

Commit 116679a

Browse files
Peng Wubroonie
authored andcommitted
spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()
Fix the unreasonable clk_prepare_enable() with clk_disable_unprepare() before return from mchp_corespi_probe() in the error handling case. Signed-off-by: Peng Wu <wupeng58@huawei.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20220611021117.40494-1-wupeng58@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent c349fad commit 116679a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-microchip-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
580580

581581
error_release_hardware:
582582
mchp_corespi_disable(spi);
583-
clk_prepare_enable(spi->clk);
583+
clk_disable_unprepare(spi->clk);
584584
error_release_master:
585585
spi_master_put(master);
586586

0 commit comments

Comments
 (0)