diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-03-03 04:05:55 +0300 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2015-03-26 02:36:09 +0300 |
commit | d89a7f69d69409ffafad7affc1cc3085d2cd0dd8 (patch) | |
tree | 8c5596899f24618ad3f7fe04250f605d3d164c5c /drivers/phy/phy-qcom-ufs.c | |
parent | 080de5ba390c54b7504c43b36ae21911acf66b30 (diff) | |
download | linux-d89a7f69d69409ffafad7affc1cc3085d2cd0dd8.tar.xz |
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>
Diffstat (limited to 'drivers/phy/phy-qcom-ufs.c')
-rw-r--r-- | drivers/phy/phy-qcom-ufs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 44ee983d57fe..d95effe3cdc1 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -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; } |