netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2]  linux-2.6.7/net/atm/mpc.c: add error check
@ 2004-11-20  2:43 janitor
  0 siblings, 0 replies; only message in thread
From: janitor @ 2004-11-20  2:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, janitor, WHarms, wharms



Content-type: text/plain; charset=us-ascii

add errorcheck for register_netdevice_notifier()

Signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---

 linux-2.6.10-rc2-bk4-max/net/atm/mpc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN net/atm/mpc.c~check-register_netdevice_notifier-net_atm_mpc net/atm/mpc.c
--- linux-2.6.10-rc2-bk4/net/atm/mpc.c~check-register_netdevice_notifier-net_atm_mpc	2004-11-20 03:04:37.000000000 +0100
+++ linux-2.6.10-rc2-bk4-max/net/atm/mpc.c	2004-11-20 03:04:37.000000000 +0100
@@ -761,7 +761,10 @@ int atm_mpoa_mpoad_attach (struct atm_vc
 		mpc_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);
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-20  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-20  2:43 [patch 2/2] linux-2.6.7/net/atm/mpc.c: add error check janitor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).