Skip to content

Commit d89a7f6

Browse files
AxelLinkishon
authored andcommitted
phy: qcom-ufs: Catch devm_phy_create failure in ufs_qcom_phy_generic_probe
Current code does NULL test against return value of ufs_qcom_phy_generic_probe. However, in the case of devm_phy_create() failure, ufs_qcom_phy_generic_probe does not return NULL. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
1 parent 080de5b commit d89a7f6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/phy/phy-qcom-ufs.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ struct phy *ufs_qcom_phy_generic_probe(struct platform_device *pdev,
101101
if (IS_ERR(generic_phy)) {
102102
err = PTR_ERR(generic_phy);
103103
dev_err(dev, "%s: failed to create phy %d\n", __func__, err);
104+
generic_phy = NULL;
104105
goto out;
105106
}
106107

0 commit comments

Comments
 (0)