[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1470221915-5880-1-git-send-email-weiyj.lk@gmail.com>
Date: Wed, 3 Aug 2016 10:58:35 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Alexander Kochetkov <al.kochet@...il.com>,
Philippe Reynes <tremyfr@...il.com>,
Peter Chen <peter.chen@....com>,
Caesar Wang <wxt@...k-chips.com>
Cc: Wei Yongjun <weiyj.lk@...il.com>, netdev@...r.kernel.org
Subject: [PATCH] net: arc_emac: add missing of_node_put() in arc_emac_probe()
commit a94efbd7cc45 ("ethernet: arc: emac_main: add missing of_node_put
after calling of_parse_phandle") added missing of_node_put after calling
of_parse_phandle, but missing the devm_ioremap_resource() error handling
case.
Signed-off-by: Wei Yongjun <weiyj.lk@...il.com>
---
drivers/net/ethernet/arc/emac_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 4bff0f3..b0da969 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -771,8 +771,10 @@ int arc_emac_probe(struct net_device *ndev, int interface)
priv->dev = dev;
priv->regs = devm_ioremap_resource(dev, &res_regs);
- if (IS_ERR(priv->regs))
- return PTR_ERR(priv->regs);
+ if (IS_ERR(priv->regs)) {
+ err = PTR_ERR(priv->regs);
+ goto out_put_node;
+ }
dev_dbg(dev, "Registers base address is 0x%p\n", priv->regs);
Powered by blists - more mailing lists