[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1428078408-13344-11-git-send-email-kishon@ti.com>
Date: Fri, 3 Apr 2015 21:56:38 +0530
From: Kishon Vijay Abraham I <kishon@...com>
To: <gregkh@...uxfoundation.org>
CC: <kishon@...com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH 10/20] phy: qcom-ufs: Catch devm_phy_create failure in ufs_qcom_phy_generic_probe
From: Axel Lin <axel.lin@...ics.com>
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@...ics.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
---
drivers/phy/phy-qcom-ufs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c
index 44ee983..d95effe 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;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists