mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] ata: sata_gemini: Add check for clk_enable
@ 2024-04-03  4:33 Chen Ni
  2024-04-04  3:44 ` Damien Le Moal
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2024-04-03  4:33 UTC (permalink / raw)
  To: linus.walleij, dlemoal, cassel; +Cc: linux-ide, linux-kernel, Chen Ni

The call to clk_enable() in gemini_sata_start_bridge() can fail.
Add a check to detect such failure.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
Changelog:

v1 -> v2:
1. Simplify commit message
---
 drivers/ata/sata_gemini.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
index 400b22ee99c3..4c270999ba3c 100644
--- a/drivers/ata/sata_gemini.c
+++ b/drivers/ata/sata_gemini.c
@@ -200,7 +200,10 @@ int gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge)
 		pclk = sg->sata0_pclk;
 	else
 		pclk = sg->sata1_pclk;
-	clk_enable(pclk);
+	ret = clk_enable(pclk);
+	if (ret)
+		return ret;
+
 	msleep(10);
 
 	/* Do not keep clocking a bridge that is not online */
-- 
2.25.1


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

* Re: [PATCH v2] ata: sata_gemini: Add check for clk_enable
  2024-04-03  4:33 [PATCH v2] ata: sata_gemini: Add check for clk_enable Chen Ni
@ 2024-04-04  3:44 ` Damien Le Moal
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2024-04-04  3:44 UTC (permalink / raw)
  To: Chen Ni, linus.walleij, cassel; +Cc: linux-ide, linux-kernel

On 4/3/24 13:33, Chen Ni wrote:
> The call to clk_enable() in gemini_sata_start_bridge() can fail.
> Add a check to detect such failure.
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Applied to for-6.9-fixes. Thanks !

-- 
Damien Le Moal
Western Digital Research


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

end of thread, other threads:[~2024-04-04  3:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03  4:33 [PATCH v2] ata: sata_gemini: Add check for clk_enable Chen Ni
2024-04-04  3:44 ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®