shell: Remove redundant checking for argv[0]

The way get_command_and_module() is used it's impossible for it to be
given an argv where argv[0] is NULL.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-15 08:42:27 +02:00 committed by Johan Hedberg
commit fe20f55d03

View file

@ -157,11 +157,6 @@ static const char *get_command_and_module(char *argv[], int *module)
{
*module = -1;
if (!argv[0]) {
printk("Unrecognized command\n");
return NULL;
}
if (default_module == -1) {
if (!argv[1] || argv[1][0] == '\0') {
printk("Unrecognized command: %s\n", argv[0]);