Skip to contentSkip to conversation

make module param bint handle nul value

PATCH In review Dave Young 1 participant 1 message Feb 1, 2012

lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH 1/2 make module param bint handle nul value

Allow bint param accept nul values, just do same as bool param.

Cc Rusty Russell <[email protected]>
---
 kernel/params.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/params.c +2 -1
@@ -97,7 +97,8 @@ static int parse_one(char *param,
 	for (i = 0; i < num_params; i++) {
 		if (parameq(param, params[i].name)) {
 			/* No one handled NULL, so do it here. */
-			if (!val && params[i].ops->set != param_set_bool)
+			if (!val && params[i].ops->set != param_set_bool
+			    && params[i].ops->set != param_set_bint)
 				return -EINVAL;
 			pr_debug("They are equal!  Calling %p\n",
 			       params[i].ops->set);