netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: janitor@sternwelten.at
To: davem@davemloft.net
Cc: netdev@oss.sgi.com, janitor@sternwelten.at, WHarms@bfs.de, wharms@bfs.de
Subject: [patch 2/2]  linux-2.6.7/net/atm/mpc.c: add error check
Date: Sat, 20 Nov 2004 03:43:00 +0100	[thread overview]
Message-ID: <E1CVLDJ-00028Y-3q@sputnik> (raw)



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);
_

                 reply	other threads:[~2004-11-20  2:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1CVLDJ-00028Y-3q@sputnik \
    --to=janitor@sternwelten.at \
    --cc=WHarms@bfs.de \
    --cc=davem@davemloft.net \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).