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>
This commit is contained in:
Axel Lin 2015-03-03 09:05:55 +08:00 committed by Kishon Vijay Abraham I
parent 080de5ba39
commit d89a7f69d6
1 changed files with 1 additions and 0 deletions

View File

@ -101,6 +101,7 @@ struct phy *ufs_qcom_phy_generic_probe(struct platform_device *pdev,
if (IS_ERR(generic_phy)) {
err = PTR_ERR(generic_phy);
dev_err(dev, "%s: failed to create phy %d\n", __func__, err);
generic_phy = NULL;
goto out;
}