summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/moxa
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-03-02 13:11:10 +0300
committerDavid S. Miller <davem@davemloft.net>2016-03-04 01:17:14 +0300
commit1d3cd1773fddfdc9ffb0c2dec9a954c7a54bc207 (patch)
treeebaa42d0f51e8532e6de598633db1b72a61231e9 /drivers/net/ethernet/moxa
parent63a0a00b90b5193173bcf76ef24afdda8eb05d3a (diff)
downloadlinux-1d3cd1773fddfdc9ffb0c2dec9a954c7a54bc207.tar.xz
net: moxa: fix an error code
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> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/moxa')
-rw-r--r--drivers/net/ethernet/moxa/moxart_ether.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
index 00cfd95ca59d..3e67f451f2ab 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;
}