From: Christophe Lucas Date: Mon, 18 Jul 2005 20:38:07 +0000 (-0700) Subject: [SCTP]: Audit return code of create_proc_* X-Git-Tag: v2.6.13-rc4~84^2~29 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ee71a29eb5e341fe977c5ad7a43782c29bd9cb9e;p=linux-2.6-omap-h63xx.git [SCTP]: Audit return code of create_proc_* From: Christophe Lucas Audit return of create_proc_* functions. Signed-off-by: Christophe Lucas Signed-off-by: Domen Puncer Signed-off-by: David S. Miller --- diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c index 0781e5d509f..8ff588f0d76 100644 --- a/net/sctp/objcnt.c +++ b/net/sctp/objcnt.c @@ -127,8 +127,12 @@ done: /* Initialize the objcount in the proc filesystem. */ void sctp_dbg_objcnt_init(void) { - create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp, + struct proc_dir_entry *ent; + ent = create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp, sctp_dbg_objcnt_read, NULL); + if (!ent) + printk(KERN_WARNING + "sctp_dbg_objcnt: Unable to create /proc entry.\n"); } /* Cleanup the objcount entry in the proc filesystem. */