netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: wangchen@cn.fujitsu.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] [ATM]: Add error handling for proc_create fail
Date: Fri, 29 Feb 2008 10:38:03 -0800 (PST)	[thread overview]
Message-ID: <20080229.103803.151963676.davem@davemloft.net> (raw)
In-Reply-To: <47C7B79C.2010304@cn.fujitsu.com>

From: Wang Chen <wangchen@cn.fujitsu.com>
Date: Fri, 29 Feb 2008 15:43:24 +0800

> @@ -963,6 +963,10 @@ static int __init atm_clip_init(void)
>  		struct proc_dir_entry *p;
>  
>  		p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops);
> +		if (!p) {
> +			printk(KERN_ERR "Unable to initialize /proc/atm/arp\n");
> +			return -ENOMEM;
> +		}
>  	}
>  #endif
>  

This is not sufficient.  If this fails you need to unregister
the ioctl and all of the other things that get registered
before this procfs registry runs.

  parent reply	other threads:[~2008-02-29 18:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29  7:43 [PATCH] [ATM]: Add error handling for proc_create fail Wang Chen
2008-02-29 12:42 ` chas williams - CONTRACTOR
2008-02-29 18:38 ` David Miller [this message]
2008-03-03  2:44   ` take#2: " Wang Chen
2008-03-03  5:09     ` David Miller
2008-03-03  8:46       ` take#3: " Wang Chen
2008-03-04  7:27         ` take#4: " Wang Chen
2008-03-24  4:47           ` David Miller

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=20080229.103803.151963676.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=wangchen@cn.fujitsu.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).