From 49c61cca2b6591a28ffa4abb73c718091f569746 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Sat, 14 Oct 2006 03:07:30 +0900 Subject: 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 Signed-off-by: Scott Murray Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/cpcihp_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/pci/hotplug/cpcihp_generic.c') diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c index e847f0d6c7fe..f3852a6b74ea 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"); -- cgit v1.2.3