From: Axel Lin <axel.lin@ingics.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Peter Griffin <peter.griffin@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] phy: spear1340-miphy: Return proper error for spear1340_miphy_xlate
Date: Wed, 25 Mar 2015 17:03:07 +0800 [thread overview]
Message-ID: <1427274187.2613.1.camel@phoenix> (raw)
In-Reply-To: <1427274093.2613.0.camel@phoenix>
The of_xlate callback should return ERR_PTR on error.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/phy/phy-spear1340-miphy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c
index e42bc20..210979b 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -229,14 +229,14 @@ static struct phy *spear1340_miphy_xlate(struct device *dev,
if (args->args_count < 1) {
dev_err(dev, "DT did not pass correct no of args\n");
- return NULL;
+ return ERR_PTR(-EINVAL);
}
priv->mode = args->args[0];
if (priv->mode != SATA && priv->mode != PCIE) {
dev_err(dev, "DT did not pass correct phy mode\n");
- return NULL;
+ return ERR_PTR(-EINVAL);
}
return priv->phy;
--
1.9.1
next prev parent reply other threads:[~2015-03-25 9:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 9:01 [PATCH 1/2] phy: spear1310-miphy: Return proper error for spear1310_miphy_xlate Axel Lin
2015-03-25 9:03 ` Axel Lin [this message]
2015-03-31 16: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=1427274187.2613.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.griffin@linaro.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.