devlink: Fix error reporting in cmd_resource_set()

resource_path_parse() returns either zero or a negative error code,
hence the negated value must be passed to strerror().

Fixes: 8cd6440958 ("devlink: Add support for devlink resource abstraction")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Phil Sutter 2018-10-18 13:28:23 +02:00 committed by Stephen Hemminger
parent 92885e1973
commit b1ffc1f465
1 changed files with 1 additions and 1 deletions

View File

@ -5127,7 +5127,7 @@ static int cmd_resource_set(struct dl *dl)
&dl->opts.resource_id,
&dl->opts.resource_id_valid);
if (err) {
pr_err("error parsing resource path %s\n", strerror(err));
pr_err("error parsing resource path %s\n", strerror(-err));
goto out;
}