[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200802291242.m1TCguPo018924@cmf.nrl.navy.mil>
Date: Fri, 29 Feb 2008 07:42:56 -0500
From: "chas williams - CONTRACTOR" <chas@....nrl.navy.mil>
To: Wang Chen <wangchen@...fujitsu.com>
cc: NETDEV <netdev@...r.kernel.org>
Subject: Re: [PATCH] [ATM]: Add error handling for proc_create fail
it should be /proc/net/atm/foo not /proc/atm/foo i think.
In message <47C7B79C.2010304@...fujitsu.com>,Wang Chen writes:
>When proc_create() fail, we return -ENOMEM.
>
>Signed-off-by: Wang Chen <wangchen@...fujitsu.com>
>---
> net/atm/clip.c | 4 ++++
> net/atm/lec.c | 4 ++++
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
>diff --git a/net/atm/clip.c b/net/atm/clip.c
>index d30167c..57ed448 100644
>--- a/net/atm/clip.c
>+++ b/net/atm/clip.c
>@@ -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
>
>diff --git a/net/atm/lec.c b/net/atm/lec.c
>index 0e450d1..532965d 100644
>--- a/net/atm/lec.c
>+++ b/net/atm/lec.c
>@@ -1250,6 +1250,10 @@ static int __init lane_module_init(void)
> struct proc_dir_entry *p;
>
> p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops);
>+ if (!p) {
>+ printk(KERN_ERR "Unable to initialize /proc/atm/lec\n");
>+ return -ENOMEM;
>+ }
> #endif
>
> register_atm_ioctl(&lane_ioctl_ops);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists