Skip to content

Commit

Permalink
mptcp: userspace pm rename remove_err to out
Browse files Browse the repository at this point in the history
The value of 'err' will not be only '-EINVAL', but can be '0' in some
cases.

So it's better to rename the label 'remove_err' to 'out' to avoid
confusions.

Suggested-by: Matthieu Baerts <matttbe@kernel.org>
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-6-8d6b94150f6b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Geliang Tang authored and Jakub Kicinski committed Nov 30, 2023
1 parent b2e2248 commit b3ac570
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/mptcp/pm_userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)

if (!mptcp_pm_is_userspace(msk)) {
GENL_SET_ERR_MSG(info, "invalid request; userspace PM not selected");
goto remove_err;
goto out;
}

if (id_val == 0) {
err = mptcp_userspace_pm_remove_id_zero_address(msk, info);
goto remove_err;
goto out;
}

lock_sock(sk);
Expand All @@ -296,7 +296,7 @@ int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)
if (!match) {
GENL_SET_ERR_MSG(info, "address with specified id not found");
release_sock(sk);
goto remove_err;
goto out;
}

list_move(&match->list, &free_list);
Expand All @@ -310,7 +310,7 @@ int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)
}

err = 0;
remove_err:
out:
sock_put(sk);
return err;
}
Expand Down

0 comments on commit b3ac570

Please sign in to comment.