Skip to content

Commit

Permalink
spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_co…
Browse files Browse the repository at this point in the history
…respi_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>
  • Loading branch information
Peng Wu authored and Mark Brown committed Jun 13, 2022
1 parent c349fad commit 116679a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-microchip-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)

error_release_hardware:
mchp_corespi_disable(spi);
clk_prepare_enable(spi->clk);
clk_disable_unprepare(spi->clk);
error_release_master:
spi_master_put(master);

Expand Down

0 comments on commit 116679a

Please sign in to comment.