linux_dsm_epyc7002/drivers/net/ethernet/ibm/emac
Christophe Jaillet 138b57f0f8 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>
2017-08-20 19:53:08 -07:00
..
core.c net: ibm: emac: Fix some error handling path in 'emac_probe()' 2017-08-20 19:53:08 -07:00
core.h net: ibm: emac: Fix some error handling path in 'emac_probe()' 2017-08-20 19:53:08 -07:00
debug.h net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
emac.h powerpc/44x: Add more changes for APM821XX EMAC driver 2012-03-06 17:07:42 -05:00
Kconfig net: emac: add support for device-tree based PHY discovery and setup 2017-02-22 15:36:47 -05:00
Makefile net: ibm: emac: remove unused sysrq handler for 'c' key 2017-04-05 07:26:18 -07:00
mal.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
mal.h emac: aggregation of v1-2 PLB errors for IER register 2014-05-30 16:29:57 -07:00
phy.c drivers: net: emac: add const to mii_phy_ops structures 2017-06-08 15:32:48 -04:00
phy.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
rgmii.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
rgmii.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
tah.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
tah.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00
zmii.c net: Convert to using %pOF instead of full_name 2017-07-24 13:41:48 -07:00
zmii.h ibm/emac: Remove extern from function prototypes 2013-09-24 12:51:27 -07:00