devlink: catch missing strings in dl_args_required

Currently if dl_args_required doesn't contain a string
for a given option the fact that the option is missing
is silently ignored.

Add a catch-all case and print a generic error.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
Jakub Kicinski 2019-11-05 13:17:06 -08:00 committed by David Ahern
parent 9a0a2fcbf4
commit 1896b100af

View File

@ -1157,6 +1157,10 @@ static int dl_args_finding_required_validate(uint64_t o_required,
return -EINVAL;
}
}
if (o_required & ~o_found) {
pr_err("BUG: unknown argument required but not found\n");
return -EINVAL;
}
return 0;
}