diff options
author | Chen Ni <nichen@iscas.ac.cn> | 2024-04-03 04:33:49 +0000 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2024-04-04 12:42:00 +0900 |
commit | e85006ae7430aef780cc4f0849692e266a102ec0 (patch) | |
tree | 9c49d93cec5a5d28e5775e3ecd9f68e9c62f07bb /drivers | |
parent | 3137b83a90646917c90951d66489db466b4ae106 (diff) | |
download | linux-stable-e85006ae7430aef780cc4f0849692e266a102ec0.tar.gz linux-stable-e85006ae7430aef780cc4f0849692e266a102ec0.tar.bz2 linux-stable-e85006ae7430aef780cc4f0849692e266a102ec0.zip |
ata: sata_gemini: Check clk_enable() result
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>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/sata_gemini.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |