From: Dan Carpenter <dan.carpenter@oracle.com>
To: "David S. Miller" <davem@davemloft.net>,
Jonas Jensen <jonas.jensen@gmail.com>
Cc: "Luis de Bethencourt" <luis@debethencourt.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"françois romieu" <romieu@fr.zoreil.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] net: moxa: fix an error code
Date: Wed, 2 Mar 2016 13:11:10 +0300 [thread overview]
Message-ID: <20160302101110.GI5533@mwanda> (raw)
We accidentally return IS_ERR(priv->base) which is 1 instead of
PTR_ERR(priv->base) which is the error code.
Fixes: 6c821bd9edc9 ('net: Add MOXA ART SoCs ethernet driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
index 00cfd95..3e67f45 100644
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -474,9 +474,9 @@ static int moxart_mac_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ndev->base_addr = res->start;
priv->base = devm_ioremap_resource(p_dev, res);
- ret = IS_ERR(priv->base);
- if (ret) {
+ if (IS_ERR(priv->base)) {
dev_err(p_dev, "devm_ioremap_resource failed\n");
+ ret = PTR_ERR(priv->base);
goto init_fail;
}
next reply other threads:[~2016-03-02 10:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 10:11 Dan Carpenter [this message]
2016-03-02 10:52 ` [patch] net: moxa: fix an error code Arnd Bergmann
2016-03-02 11:21 ` Dan Carpenter
2016-03-02 11:36 ` Arnd Bergmann
2016-03-02 12:15 ` Dan Carpenter
2016-03-02 12:42 ` Arnd Bergmann
2016-03-03 22:17 ` David Miller
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=20160302101110.GI5533@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=jonas.jensen@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=luis@debethencourt.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).