summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/emac/core.h
diff options
context:
space:
mode:
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>2017-08-20 06:35:00 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-20 19:53:08 -0700
commit138b57f0f893873badd86e33c2b1f7bbc0bab831 (patch)
tree7c6c5333ad0329971a2e3f5af7a7a49a606879ef /drivers/net/ethernet/ibm/emac/core.h
parentc3168cabe1af2683475d0e3048220c04b7fa4f51 (diff)
net: ibm: emac: Fix some error handling path in 'emac_probe()'
If 'irq_of_parse_and_map()' or 'of_address_to_resource()' fail, 'err' is known to be 0 at this point. So return -ENODEV instead in the first case and use 'of_iomap()' instead of the equivalent 'of_address_to_resource()/ioremap()' combinaison in the 2nd case. Doing so, the 'rsrc_regs' field of the 'emac_instance struct' becomes redundant and is removed. While at it, turn a 'err != 0' test into an equivalent 'err' to be more consistent. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/emac/core.h')
-rw-r--r--drivers/net/ethernet/ibm/emac/core.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.h b/drivers/net/ethernet/ibm/emac/core.h
index f10e156641d5..369de2cfb15b 100644
--- a/drivers/net/ethernet/ibm/emac/core.h
+++ b/drivers/net/ethernet/ibm/emac/core.h
@@ -167,7 +167,6 @@ struct emac_error_stats {
struct emac_instance {
struct net_device *ndev;
- struct resource rsrc_regs;
struct emac_regs __iomem *emacp;
struct platform_device *ofdev;
struct device_node **blist; /* bootlist entry */