aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/ll_temac.h
diff options
context:
space:
mode:
authorEsben Haabendal <esben@geanix.com>2019-04-30 09:17:48 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-01 14:33:30 -0400
commita63625d2a0e794f9a348a7119e50b0a56cbd6a18 (patch)
tree291d69d25d2f87093c62a1d586a4467db21ab9ae /drivers/net/ethernet/xilinx/ll_temac.h
parentnet: ethernet: ti: cpsw: Fix inconsistent IS_ERR and PTR_ERR in cpsw_probe() (diff)
downloadlinux-dev-a63625d2a0e794f9a348a7119e50b0a56cbd6a18.tar.xz
linux-dev-a63625d2a0e794f9a348a7119e50b0a56cbd6a18.zip
net: ll_temac: Fix and simplify error handling by using devres functions
As a side effect, a few error cases are fixed. If of_iomap() of sdma_regs failed, no error code was returned. Fixed to return -ENOMEM similar to of_iomap() fail of regs. If sysfs_create_group() or register_netdev() failed, lp->phy_node was not released. Finally, the order in remove function is corrected to be reverse order of what is done in probe, i.e. calling temac_mdio_teardown() last, so we unregister the netdev that most likely is using the mdio_bus first. Signed-off-by: Esben Haabendal <esben@geanix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/ll_temac.h')
-rw-r--r--drivers/net/ethernet/xilinx/ll_temac.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xilinx/ll_temac.h b/drivers/net/ethernet/xilinx/ll_temac.h
index 107575225383..45575788ed54 100644
--- a/drivers/net/ethernet/xilinx/ll_temac.h
+++ b/drivers/net/ethernet/xilinx/ll_temac.h
@@ -378,7 +378,7 @@ void temac_indirect_out32(struct temac_local *lp, int reg, u32 value);
/* xilinx_temac_mdio.c */
-int temac_mdio_setup(struct temac_local *lp, struct device_node *np);
+int temac_mdio_setup(struct temac_local *lp, struct platform_device *pdev);
void temac_mdio_teardown(struct temac_local *lp);
#endif /* XILINX_LL_TEMAC_H */