Skip to content

Commit

Permalink
net: sctp: drop unneeded likely() call around IS_ERR()
Browse files Browse the repository at this point in the history
IS_ERR() already calls unlikely(), so this extra unlikely() call
around IS_ERR() is not needed.

Signed-off-by: Enrico Weigelt <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
metux authored and davem330 committed Jul 29, 2019
1 parent c6b36bd commit d4e575b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ static int sctp_setsockopt_bindx(struct sock *sk,
return -EINVAL;

kaddrs = memdup_user(addrs, addrs_size);
if (unlikely(IS_ERR(kaddrs)))
if (IS_ERR(kaddrs))
return PTR_ERR(kaddrs);

/* Walk through the addrs buffer and count the number of addresses. */
Expand Down Expand Up @@ -1315,7 +1315,7 @@ static int __sctp_setsockopt_connectx(struct sock *sk,
return -EINVAL;

kaddrs = memdup_user(addrs, addrs_size);
if (unlikely(IS_ERR(kaddrs)))
if (IS_ERR(kaddrs))
return PTR_ERR(kaddrs);

/* Allow security module to validate connectx addresses. */
Expand Down

0 comments on commit d4e575b

Please sign in to comment.