From: <Conor.Dooley@microchip.com>
To: <wupeng58@huawei.com>, <broonie@kernel.org>
Cc: <linux-riscv@lists.infradead.org>, <linux-spi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <Lewis.Hanly@microchip.com>,
<liwei391@huawei.com>
Subject: Re: [PATCH] spi: micro: fix unreasonable clk_prepare_enable() on error in mchp_corespi_probe()
Date: Sat, 11 Jun 2022 07:11:17 +0000 [thread overview]
Message-ID: <0c4c572d-0fec-05cd-e738-4206290b40f2@microchip.com> (raw)
In-Reply-To: <20220611021117.40494-1-wupeng58@huawei.com>
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
>
next prev parent reply other threads:[~2022-06-11 7:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=0c4c572d-0fec-05cd-e738-4206290b40f2@microchip.com \
--to=conor.dooley@microchip.com \
--cc=Lewis.Hanly@microchip.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=wupeng58@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).