linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()
@ 2022-06-11  2:11 Peng Wu
  2022-06-11  7:11 ` Conor.Dooley
  2022-06-13 17:24 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Wu @ 2022-06-11  2:11 UTC (permalink / raw)
  To: lewis.hanly, conor.dooley, broonie
  Cc: linux-riscv, linux-spi, linux-kernel, liwei391, wupeng58

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>
---
 drivers/spi/spi-microchip-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index 5b2aee30fa04..bf6847d95fe3 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);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()
  2022-06-11  2:11 [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() Peng Wu
@ 2022-06-11  7:11 ` Conor.Dooley
  2022-06-13 17:24 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Conor.Dooley @ 2022-06-11  7:11 UTC (permalink / raw)
  To: wupeng58, broonie
  Cc: linux-riscv, linux-spi, linux-kernel, Lewis.Hanly, liwei391

On 11/06/2022 03:11, Peng Wu wrote:
> spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()

       ^ s/micro/microchip-core ?

> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> 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>

"unreasonable", very diplomatic way of putting it!

Good spot, thanks.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

> ---
>  drivers/spi/spi-microchip-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index 5b2aee30fa04..bf6847d95fe3 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);
> 
> --
> 2.17.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()
  2022-06-11  2:11 [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() Peng Wu
  2022-06-11  7:11 ` Conor.Dooley
@ 2022-06-13 17:24 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-06-13 17:24 UTC (permalink / raw)
  To: conor.dooley, lewis.hanly, wupeng58
  Cc: linux-spi, linux-kernel, liwei391, linux-riscv

On Sat, 11 Jun 2022 02:11:17 +0000, Peng Wu wrote:
> Fix the unreasonable clk_prepare_enable() with clk_disable_unprepare()
> before return from mchp_corespi_probe() in the error handling case.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()
      commit: 116679aef2f92d535ea8049ef2a610bc73f94660

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-13 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-11  2:11 [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() Peng Wu
2022-06-11  7:11 ` Conor.Dooley
2022-06-13 17:24 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).