* [PATCH] cpcihp_generic: prevent loading without "bridge" parameter
@ 2006-10-13 18:07 Akinobu Mita
2006-10-13 18:10 ` Scott Murray
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2006-10-13 18:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Scott Murray
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");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cpcihp_generic: prevent loading without "bridge" parameter
2006-10-13 18:07 [PATCH] cpcihp_generic: prevent loading without "bridge" parameter Akinobu Mita
@ 2006-10-13 18:10 ` Scott Murray
0 siblings, 0 replies; 2+ messages in thread
From: Scott Murray @ 2006-10-13 18:10 UTC (permalink / raw)
To: Akinobu Mita; +Cc: Linux Kernel Mailing List, Greg Kroah-Hartman
On Sat, 14 Oct 2006, Akinobu Mita wrote:
> 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>
Signed-off-by: Scott Murray <scottm@somanetworks.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");
--
Scott Murray
SOMA Networks, Inc.
Toronto, Ontario
e-mail: scottm@somanetworks.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-13 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-13 18:07 [PATCH] cpcihp_generic: prevent loading without "bridge" parameter Akinobu Mita
2006-10-13 18:10 ` Scott Murray
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.