From: Peng Wu Date: Sat, 11 Jun 2022 02:11:17 +0000 (+0000) Subject: spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() X-Git-Tag: v6.6.17~6771^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=116679aef2f92d535ea8049ef2a610bc73f94660;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20220611021117.40494-1-wupeng58@huawei.com Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c index 3bd285dd4964..5b22a1395554 100644 --- a/drivers/spi/spi-microchip-core.c +++ b/drivers/spi/spi-microchip-core.c @@ -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);