From: Peng Wu <wupeng58@huawei.com> To: <lewis.hanly@microchip.com>, <conor.dooley@microchip.com>, <broonie@kernel.org> Cc: <linux-riscv@lists.infradead.org>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <liwei391@huawei.com>, <wupeng58@huawei.com> Subject: [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() Date: Sat, 11 Jun 2022 02:11:17 +0000 [thread overview] Message-ID: <20220611021117.40494-1-wupeng58@huawei.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Peng Wu <wupeng58@huawei.com> To: <lewis.hanly@microchip.com>, <conor.dooley@microchip.com>, <broonie@kernel.org> Cc: <linux-riscv@lists.infradead.org>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <liwei391@huawei.com>, <wupeng58@huawei.com> Subject: [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe() Date: Sat, 11 Jun 2022 02:11:17 +0000 [thread overview] Message-ID: <20220611021117.40494-1-wupeng58@huawei.com> (raw) 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2022-06-11 2:16 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-11 2:11 Peng Wu [this message] 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-11 7:11 ` Conor.Dooley 2022-06-13 17:24 ` Mark Brown 2022-06-13 17:24 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220611021117.40494-1-wupeng58@huawei.com \ --to=wupeng58@huawei.com \ --cc=broonie@kernel.org \ --cc=conor.dooley@microchip.com \ --cc=lewis.hanly@microchip.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=linux-spi@vger.kernel.org \ --cc=liwei391@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.