genl: genl_ctrl_grp_by_name: fix retval in case group id not found
Now the return value in case group id is not find is 0. Change it to return -NLE_OBJ_NOTFOUND which makes more sense. This should not break anything because genl_ctrl_grp_by_name is static and called only from genl_ctrl_resolve_grp. genl_ctrl_resolve_grp already might return -NLE_OBJ_NOTFOUND. Signed-off-by: Jiri Pirko <jpirko@redhat.com>
This commit is contained in:
parent
17781e44dd
commit
7adaad784f
1 changed files with 1 additions and 1 deletions
|
@ -293,7 +293,7 @@ static int genl_ctrl_grp_by_name(const struct genl_family *family,
|
|||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return -NLE_OBJ_NOTFOUND;
|
||||
}
|
||||
|
||||
int genl_ctrl_resolve_grp(struct nl_sock *sk, const char *family_name,
|
||||
|
|
Loading…
Add table
Reference in a new issue