mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: domen@coderock.org
To: axboe@suse.de
Cc: linux-kernel@vger.kernel.org,
	Christophe Lucas <clucas@rotomalug.org>,
	domen@coderock.org
Subject: [patch 1/2] block/cpqarray: Audit return code of create_proc_*
Date: Fri, 15 Jul 2005 00:20:57 +0200	[thread overview]
Message-ID: <20050714222057.196354000@homer> (raw)

[-- Attachment #1: return_code-drivers_block_cpqarray --]
[-- Type: text/plain, Size: 977 bytes --]

From: Christophe Lucas <clucas@rotomalug.org>


Audit return of create_proc_* functions.

Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
 cpqarray.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

Index: quilt/drivers/block/cpqarray.c
===================================================================
--- quilt.orig/drivers/block/cpqarray.c
+++ quilt/drivers/block/cpqarray.c
@@ -212,13 +212,18 @@ static struct proc_dir_entry *proc_array
  */
 static void __init ida_procinit(int i)
 {
+	struct proc_dir_entry *ent;
+
 	if (proc_array == NULL) {
 		proc_array = proc_mkdir("cpqarray", proc_root_driver);
 		if (!proc_array) return;
 	}
 
-	create_proc_read_entry(hba[i]->devname, 0, proc_array,
+	ent = create_proc_read_entry(hba[i]->devname, 0, proc_array,
 			       ida_proc_get_info, hba[i]);
+	if (!ent)
+		printk(KERN_WARNING 
+			"cpqarray: Unable to create /proc entry.\n");
 }
 
 /*

--

                 reply	other threads:[~2005-07-14 22:24 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=20050714222057.196354000@homer \
    --to=domen@coderock.org \
    --cc=axboe@suse.de \
    --cc=clucas@rotomalug.org \
    --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®