[bug report] phy: qcom: Introduce M31 USB PHY driver
Dan Carpenter
dan.carpenter at linaro.org
Wed Sep 6 04:58:17 PDT 2023
Hello Varadarajan Narayanan,
This is a semi-automatic email about new static checker warnings.
The patch 08e49af50701: "phy: qcom: Introduce M31 USB PHY driver"
from Aug 14, 2023, leads to the following Smatch complaint:
drivers/phy/qualcomm/phy-qcom-m31.c:175 m31usb_phy_init()
warn: variable dereferenced before check 'qphy->vreg' (see line 167)
drivers/phy/qualcomm/phy-qcom-m31.c
166
167 ret = regulator_enable(qphy->vreg);
^^^^^^^^^^
Unchecked dereference
168 if (ret) {
169 dev_err(&phy->dev, "failed to enable regulator, %d\n", ret);
170 return ret;
171 }
172
173 ret = clk_prepare_enable(qphy->clk);
174 if (ret) {
175 if (qphy->vreg)
^^^^^^^^^^
Checked too late
176 regulator_disable(qphy->vreg);
177 dev_err(&phy->dev, "failed to enable cfg ahb clock, %d\n", ret);
regards,
dan carpenter
More information about the linux-phy
mailing list