diff options
author | Mao Wenan <maowenan@huawei.com> | 2019-09-12 07:02:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-13 23:06:20 +0300 |
commit | e0e4b8de10ad3affe83cc91a1cf6d1e48cca333e (patch) | |
tree | 5921d1bbc3bac880b1ba0d175b8fa3d7d01493f0 /net/sctp | |
parent | 8e2ef6abd4653b1cfeefe262017ecdd5eaf40fef (diff) | |
download | linux-e0e4b8de10ad3affe83cc91a1cf6d1e48cca333e.tar.xz |
sctp: remove redundant assignment when call sctp_get_port_local
There are more parentheses in if clause when call sctp_get_port_local
in sctp_do_bind, and redundant assignment to 'ret'. This patch is to
do cleanup.
Signed-off-by: Mao Wenan <maowenan@huawei.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 1e26606683a8..5fe26ca6edbd 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -399,9 +399,8 @@ static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) * detection. */ addr->v4.sin_port = htons(snum); - if ((ret = sctp_get_port_local(sk, addr))) { + if (sctp_get_port_local(sk, addr)) return -EADDRINUSE; - } /* Refresh ephemeral port. */ if (!bp->port) |