提交 d89a7f69 编写于 作者: A Axel Lin 提交者: Kishon Vijay Abraham I

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: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
上级 080de5ba
...@@ -101,6 +101,7 @@ struct phy *ufs_qcom_phy_generic_probe(struct platform_device *pdev, ...@@ -101,6 +101,7 @@ struct phy *ufs_qcom_phy_generic_probe(struct platform_device *pdev,
if (IS_ERR(generic_phy)) { if (IS_ERR(generic_phy)) {
err = PTR_ERR(generic_phy); err = PTR_ERR(generic_phy);
dev_err(dev, "%s: failed to create phy %d\n", __func__, err); dev_err(dev, "%s: failed to create phy %d\n", __func__, err);
generic_phy = NULL;
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册