summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-10-14 03:07:30 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 11:36:12 -0700
commit49c61cca2b6591a28ffa4abb73c718091f569746 (patch)
tree59867e7f9e0687df4259f297a5f37b48f37de78b
parent29f3eb64634cf96903a3cdb56b1f9a80bebad17d (diff)
downloadlinux-3.10-49c61cca2b6591a28ffa4abb73c718091f569746.tar.gz
linux-3.10-49c61cca2b6591a28ffa4abb73c718091f569746.tar.bz2
linux-3.10-49c61cca2b6591a28ffa4abb73c718091f569746.zip
cpcihp_generic: prevent loading without "bridge" parameter
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. Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com> Signed-off-by: Scott Murray <scottm@somanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/pci/hotplug/cpcihp_generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
index e847f0d6c7f..f3852a6b74e 100644
--- a/drivers/pci/hotplug/cpcihp_generic.c
+++ b/drivers/pci/hotplug/cpcihp_generic.c
@@ -84,7 +84,7 @@ static int __init validate_parameters(void)
if(!bridge) {
info("not configured, disabling.");
- return 1;
+ return -EINVAL;
}
str = bridge;
if(!*str)
@@ -147,7 +147,7 @@ static int __init cpcihp_generic_init(void)
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");