Skip to content

Commit 10f296c

Browse files
Dave Youngrustyrussell
authored andcommitted
module: make module param bint handle nul value
Allow bint param accept nul values, just do same as bool param. Signed-off-by: Dave Young <dyoung@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent d65b4e9 commit 10f296c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/params.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ static int parse_one(char *param,
9797
for (i = 0; i < num_params; i++) {
9898
if (parameq(param, params[i].name)) {
9999
/* No one handled NULL, so do it here. */
100-
if (!val && params[i].ops->set != param_set_bool)
100+
if (!val && params[i].ops->set != param_set_bool
101+
&& params[i].ops->set != param_set_bint)
101102
return -EINVAL;
102103
pr_debug("They are equal! Calling %p\n",
103104
params[i].ops->set);

0 commit comments

Comments
 (0)