From: Colin Ian King Date: Fri, 31 May 2019 12:05:59 +0000 (+0100) Subject: phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable X-Git-Tag: v5.4-rc1~600^2~20^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d98010817a26eba8d4d1e8a639e0b7d7f042308a;p=platform%2Fkernel%2Flinux-rpi.git phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable 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") Signed-off-by: Colin Ian King Signed-off-by: Kishon Vijay Abraham I --- diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c index 1cbf1d6f..bf94a52 100644 --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c @@ -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;