Skip to content
Commit 138b57f0 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by David S. Miller
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3168cab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment