Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Kishon Vijay Abraham I
d89a7f69 080de5ba

+1
+1
drivers/phy/phy-qcom-ufs.c
··· 101 101 if (IS_ERR(generic_phy)) { 102 102 err = PTR_ERR(generic_phy); 103 103 dev_err(dev, "%s: failed to create phy %d\n", __func__, err); 104 + generic_phy = NULL; 104 105 goto out; 105 106 } 106 107