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:
parent
92885e1973
commit
b1ffc1f465
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue