linux-2.6.7/net/atm/mpc.c: add error check
Subsystems (3)
PATCH 2/2 linux-2.6.7/net/atm/mpc.c: add error check
Content-type: text/plain; charset=us-ascii
add errorcheck for register_netdevice_notifier()
Signed-off-by walter harms <[email protected]>
Signed-off-by Maximilian Attems <[email protected]>
---
linux-2.6.10-rc2-bk4-max/net/atm/mpc.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-)
net/atm/mpc.c renamed from net/atm/mpc.c~check-register_netdevice_notifier-net_atm_mpc +4 -1
@@ -761,7 +761,10 @@ int atm_mpoa_mpoad_attach (struct atm_vcmpc_timer_refresh ();/* This lets us now how our LECs are doing */ -register_netdevice_notifier (&mpoa_notifier); +if (register_netdevice_notifier (&mpoa_notifier) <0 ) { +del_timer (&mpc_timer); +return -1 ; + } } mpc =find_mpc_by_itfnum (arg);
_