From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Scott Murray <scottm@somanetworks.com>
Subject: [PATCH] cpcihp_generic: prevent loading without "bridge" parameter
Date: Sat, 14 Oct 2006 03:07:30 +0900 [thread overview]
Message-ID: <20061013180730.GE29079@localhost> (raw)
cpcihp_generic module requires configured "bridge" module parameter.
But it can be loaded successfully without that parameter.
Because module init call ends up returning positive value.
This patch prevents from loading without setting "bridge" module parameter.
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Scott Murray <scottm@somanetworks.com>
Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Index: work-fault-inject/drivers/pci/hotplug/cpcihp_generic.c
===================================================================
--- work-fault-inject.orig/drivers/pci/hotplug/cpcihp_generic.c
+++ work-fault-inject/drivers/pci/hotplug/cpcihp_generic.c
@@ -84,7 +84,7 @@ static int __init validate_parameters(vo
if(!bridge) {
info("not configured, disabling.");
- return 1;
+ return -EINVAL;
}
str = bridge;
if(!*str)
@@ -147,7 +147,7 @@ static int __init cpcihp_generic_init(vo
info(DRIVER_DESC " version: " DRIVER_VERSION);
status = validate_parameters();
- if(status != 0)
+ if (status)
return status;
r = request_region(port, 1, "#ENUM hotswap signal register");
next reply other threads:[~2006-10-13 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-13 18:07 Akinobu Mita [this message]
2006-10-13 18:10 ` [PATCH] cpcihp_generic: prevent loading without "bridge" parameter Scott Murray
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=20061013180730.GE29079@localhost \
--to=akinobu.mita@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=scottm@somanetworks.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.