public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] phy: mediatek: fix returning garbage
@ 2023-04-14 12:22 Tom Rix
  2023-04-14 15:43 ` Matthias Brugger
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Tom Rix @ 2023-04-14 12:22 UTC (permalink / raw)
  To: chunkuang.hu, p.zabel, chunfeng.yun, vkoul, kishon, matthias.bgg,
	angelogioacchino.delregno, nathan, ndesaulniers, granquet
  Cc: dri-devel, linux-mediatek, linux-arm-kernel, linux-phy,
	linux-kernel, llvm, Tom Rix

clang reports
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c:298:6: error: variable
  'ret' is uninitialized when used here [-Werror,-Wuninitialized]
        if (ret)
            ^~~
ret should have been set by the preceding call to mtk_hdmi_pll_set_hw.

Fixes: 45810d486bb4 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195")
Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
index abfc077fb0a8..c63294e451d6 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
@@ -292,9 +292,9 @@ static int mtk_hdmi_pll_calc(struct mtk_hdmi_phy *hdmi_phy, struct clk_hw *hw,
 	if (!(digital_div <= 32 && digital_div >= 1))
 		return -EINVAL;
 
-	mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low,
-			    PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv,
-			    txposdiv, digital_div);
+	ret = mtk_hdmi_pll_set_hw(hw, PLL_PREDIV, fbkdiv_high, fbkdiv_low,
+				  PLL_FBKDIV_HS3, posdiv1, posdiv2, txprediv,
+				  txposdiv, digital_div);
 	if (ret)
 		return -EINVAL;
 
-- 
2.27.0


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

end of thread, other threads:[~2023-05-08  8:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 12:22 [PATCH] phy: mediatek: fix returning garbage Tom Rix
2023-04-14 15:43 ` Matthias Brugger
2023-04-14 15:46   ` Matthias Brugger
2023-04-14 15:49 ` Nathan Chancellor
2023-04-17  7:38 ` AngeloGioacchino Del Regno
2023-05-05  9:28 ` Vinod Koul
2023-05-05 15:37   ` Matthias Brugger
2023-05-08  7:48     ` Vinod Koul
2023-05-08  8:24       ` Matthias Brugger
2023-05-08  8:57         ` Vinod Koul

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