mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: domen@coderock.org
To: jejb@steeleye.com
Cc: linux-kernel@vger.kernel.org, domen@coderock.org
Subject: [patch 1/1] mca/mca-proc: Audit return code of create_proc_*
Date: Thu, 14 Jul 2005 23:42:57 +0200	[thread overview]
Message-ID: <20050714214256.703875000@homer> (raw)

[-- Attachment #1: return_code-drivers_mca_mca-proc --]
[-- Type: text/plain, Size: 1262 bytes --]

From: Christophe Lucas <clucas@rotomalug.org>


---
 mca-proc.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

Index: quilt/drivers/mca/mca-proc.c
===================================================================
--- quilt.orig/drivers/mca/mca-proc.c
+++ quilt/drivers/mca/mca-proc.c
@@ -184,8 +184,14 @@ void __init mca_do_proc_init(void)
 	struct mca_device *mca_dev;
 
 	proc_mca = proc_mkdir("mca", &proc_root);
-	create_proc_read_entry("pos",0,proc_mca,get_mca_info,NULL);
-	create_proc_read_entry("machine",0,proc_mca,get_mca_machine_info,NULL);
+	node = create_proc_read_entry("pos",0,proc_mca,get_mca_info,NULL);
+	if (!node)
+		printk(KERN_WARNING "MCA: Unable to create mca /proc entry.\n");
+	node = create_proc_read_entry("machine",0,proc_mca,
+		get_mca_machine_info,NULL);
+	if (!node)
+		printk(KERN_WARNING 
+			"MCA: Unable to create machine /proc entry.\n");
 
 	/* Initialize /proc/mca entries for existing adapters */
 
@@ -211,7 +217,8 @@ void __init mca_do_proc_init(void)
 					      mca_read_proc, (void *)mca_dev);
 
 		if(node == NULL) {
-			printk("Failed to allocate memory for MCA proc-entries!");
+			printk(KERN_WARNING 
+				"Failed to allocate memory for MCA proc-entries!");
 			return;
 		}
 	}

--

                 reply	other threads:[~2005-07-14 22:00 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=20050714214256.703875000@homer \
    --to=domen@coderock.org \
    --cc=jejb@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®