]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
module: make module param bint handle nul value
authorDave Young <dyoung@redhat.com>
Wed, 1 Feb 2012 02:33:11 +0000 (10:33 +0800)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Feb 2012 00:32:15 +0000 (11:02 +1030)
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>
kernel/params.c

index 32ee04308285c051a4521a192d80dc89f34e1d59..4bc965d8a1fe8d66b66b7e7e220c08104084205a 100644 (file)
@@ -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);