phy: samsung-ufs: fix check on failed devm_clk_get call for rx1_symbol_clk
Subsystems (2)
PATCH 1/1 phy: samsung-ufs: fix check on failed devm_clk_get call for rx1_symbol_clk
From: Colin Ian King <[email protected]>
The check to see if the call to devm_clk_get on rx1_symbol_clk is checking the wrong variable, this looks like a copy-paste error. Fix this to check phy->rx1_symbol instead of phy->rx0_symbol.
Addresses-Coverity: ("Copy-paste error")
--- drivers/phy/samsung/phy-samsung-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/samsung/phy-samsung-ufs.c +1 -1
@@ -147,7 +147,7 @@ static int samsung_ufs_phy_symbol_clk_init(struct samsung_ufs_phy *phy) } phy->rx1_symbol_clk =devm_clk_get (phy->dev,"rx1_symbol_clk" ); -if (IS_ERR (phy->rx0_symbol_clk)) { +if (IS_ERR (phy->rx1_symbol_clk)) {dev_err (phy->dev,"failed to get rx1_symbol_clk clock\n" );return PTR_ERR (phy->rx1_symbol_clk); }
Signature · 1 line
2.27.0
Hello Colin,
Quoted 10 lines
-----Original Message-----
From: Colin King <[email protected]>
Sent: 20 July 2020 22:00
To: Kishon Vijay Abraham I <[email protected]>; Vinod Koul <[email protected]>; Seungwon Jeon <[email protected]>; Kiwoong Kim <[email protected]>; Alim Akhtar <[email protected]>
Cc: [email protected]; [email protected]
Subject: [PATCH][next] phy: samsung-ufs: fix check on faileddevm_clk_getcall forrx1_symbol_clk
Quoted 6 lines
From: Colin Ian King <[email protected]>
The check to see if the call to
devm_clk_getonrx1_symbol_clkis checking the wrong variable, this looks like a copy-paste error. Fix this to checkphy->rx1_symbolinstead ofphy->rx0_symbol.
This fix is already posted by Gustavo [1]
[1] https://lkml.org/lkml/2020/7/20/617
Thanks!
Quoted 24 lines
Addresses-Coverity: ("Copy-paste error")
Fixes bca21e930451 ("phy: samsung-ufs: add UFS PHY driver for samsung SoC")Signed-off-by Colin Ian King <[email protected]>--- drivers/phy/samsung/phy-samsung-ufs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/phy/samsung/phy-samsung-ufs.c +1
-1@@ -147,7 +147,7 @@ static int samsung_ufs_phy_symbol_clk_init(struct samsung_ufs_phy *phy) } phy->rx1_symbol_clk =devm_clk_get (phy->dev,"rx1_symbol_clk" ); -if (IS_ERR (phy->rx0_symbol_clk)) { +if (IS_ERR (phy->rx1_symbol_clk)) {dev_err (phy->dev,"failed to get rx1_symbol_clk clock\n" );return PTR_ERR (phy->rx1_symbol_clk);}
--
2.27.0