Commit 49c61cca authored by Akinobu Mita's avatar Akinobu Mita Committed by Greg Kroah-Hartman

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: default avatarAkinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarScott Murray <scottm@somanetworks.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 29f3eb64
...@@ -84,7 +84,7 @@ static int __init validate_parameters(void) ...@@ -84,7 +84,7 @@ static int __init validate_parameters(void)
if(!bridge) { if(!bridge) {
info("not configured, disabling."); info("not configured, disabling.");
return 1; return -EINVAL;
} }
str = bridge; str = bridge;
if(!*str) if(!*str)
...@@ -147,7 +147,7 @@ static int __init cpcihp_generic_init(void) ...@@ -147,7 +147,7 @@ static int __init cpcihp_generic_init(void)
info(DRIVER_DESC " version: " DRIVER_VERSION); info(DRIVER_DESC " version: " DRIVER_VERSION);
status = validate_parameters(); status = validate_parameters();
if(status != 0) if (status)
return status; return status;
r = request_region(port, 1, "#ENUM hotswap signal register"); r = request_region(port, 1, "#ENUM hotswap signal register");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment