From: Mao Wenan Date: Thu, 12 Sep 2019 04:02:18 +0000 (+0800) Subject: sctp: remove redundant assignment when call sctp_get_port_local X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e0e4b8de10ad3affe83cc91a1cf6d1e48cca333e;p=uclinux-h8%2Flinux.git 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 Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller --- 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)