Skip to content

Commit

Permalink
phy: qcom-qmp: initialize the pointer to NULL
Browse files Browse the repository at this point in the history
Smatch complains:
drivers/phy/qualcomm/phy-qcom-qmp.c:3899 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_cfg'.
drivers/phy/qualcomm/phy-qcom-qmp.c:3900 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_serdes'.
drivers/phy/qualcomm/phy-qcom-qmp.c:3902 qcom_qmp_phy_probe() error: uninitialized symbol 'usb_cfg'.

This is a warning but not a practical one as dp_cfg, dp_serdes and
usb_cfg will be set and used when valid. So we can set the pointers to
NULL to quiesce the warnings.

Fixes: 52e013d ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20201001070911.140019-1-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Vinod Koul committed Oct 1, 2020
1 parent 7612f4e commit 60f5a24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/phy/qualcomm/phy-qcom-qmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3928,9 +3928,9 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev)
void __iomem *usb_serdes;
void __iomem *dp_serdes;
const struct qmp_phy_combo_cfg *combo_cfg = NULL;
const struct qmp_phy_cfg *cfg;
const struct qmp_phy_cfg *usb_cfg;
const struct qmp_phy_cfg *dp_cfg;
const struct qmp_phy_cfg *cfg = NULL;
const struct qmp_phy_cfg *usb_cfg = NULL;
const struct qmp_phy_cfg *dp_cfg = NULL;
int num, id, expected_phys;
int ret;

Expand Down

0 comments on commit 60f5a24

Please sign in to comment.