tree cbbfc9d2155a939c1735986d056e0dff131c4afe
parent e2bf521d9728bfae9b6c3d484614e5962d0b5afd
author Christophe Lucas <[EMAIL PROTECTED]> Tue, 19 Jul 2005 03:38:07 -0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 19 Jul 2005 03:38:07 -0700

[SCTP]: Audit return code of create_proc_*

From: Christophe Lucas <[EMAIL PROTECTED]>

Audit return of create_proc_* functions.

Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/sctp/objcnt.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
--- 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.  */
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to