From: Axel Lin <axel.lin@ingics.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Yaniv Gardi <ygardi@codeaurora.org>,
Dov Levenglick <dovl@codeaurora.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] phy: qcom-ufs: Catch devm_phy_create failure in ufs_qcom_phy_generic_probe
Date: Tue, 03 Mar 2015 09:05:55 +0800 [thread overview]
Message-ID: <1425344755.4315.1.camel@phoenix> (raw)
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>
---
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.9.1
next reply other threads:[~2015-03-03 1:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 1:05 Axel Lin [this message]
2015-03-17 0:47 ` [PATCH] phy: qcom-ufs: Catch devm_phy_create failure in ufs_qcom_phy_generic_probe Axel Lin
2015-03-17 9:09 ` Kishon Vijay Abraham I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425344755.4315.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=dovl@codeaurora.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ygardi@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.