Skip to contentSkip to conversation

phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable

PATCH New Colin King 1 participant 1 message May 31, 2019

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable

From: Colin Ian King <[email protected]>

The error return from the call to clk_prepare_enable is not being assigned to variable ret even though ret is being used to check if the call failed. Fix this by adding in the missing assignment.

Addresses-Coverity: ("Logically dead code")

Fixes 891a96f65ac3 ("phy: qcom-qusb2: Add support for runtime PM")
---
 drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-qusb2.c +1 -1
index 1cbf1d6f28ce..bf94a52d3087 100644
@@ -564,7 +564,7 @@ static int __maybe_unused qusb2_phy_runtime_resume(struct device *dev)
 	}
 
 	if (!qphy->has_se_clk_scheme) {
-		clk_prepare_enable(qphy->ref_clk);
+		ret = clk_prepare_enable(qphy->ref_clk);
 		if (ret) {
 			dev_err(dev, "failed to enable ref clk, %d\n", ret);
 			goto disable_ahb_clk;
Signature · 1 line
2.20.1