shell: Fix looking up help for the current module

The code was not properly handling "help <cmd>" for the currently
selected module.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-15 13:55:22 +02:00 committed by Johan Hedberg
commit 45f258686b

View file

@ -211,11 +211,9 @@ static int cmd_help(int argc, char *argv[])
}
cmd_str = argv[2];
} else if (argc > 2) {
cmd_str = argv[1];
} else {
printk("Unknown module or command\n");
return -EINVAL;
cmd_str = argv[1];
module = default_module;
}
if (!module) {