All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()
@ 2019-06-05 21:03 ` Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 14+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-05 21:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: vyasevich, nhorman, marcelo.leitner, davem, linux-sctp, netdev

From: Enrico Weigelt <info@metux.net>

IS_ERR() already calls unlikely(), so this extra unlikely() call
around IS_ERR() is not needed.

Signed-off-by: Enrico Weigelt <info@metux.net>
---
 net/sctp/socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 39ea0a3..c7b0f51 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -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. */
@@ -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. */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-07-29 21:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 21:03 [PATCH] net: sctp: drop unneeded likely() call around IS_ERR() Enrico Weigelt, metux IT consult
2019-06-05 21:03 ` Enrico Weigelt, metux IT consult
2019-06-05 21:50 ` Marcelo Ricardo Leitner
2019-06-05 21:50   ` Marcelo Ricardo Leitner
2019-06-05 22:53   ` Enrico Weigelt, metux IT consult
2019-06-05 22:53     ` Enrico Weigelt, metux IT consult
2019-06-05 23:58 ` David Miller
2019-06-05 23:58   ` David Miller
2019-07-29 18:55 ` Enrico Weigelt, metux IT consult
2019-07-29 18:55   ` Enrico Weigelt, metux IT consult
2019-07-29 19:03   ` Marcelo Ricardo Leitner
2019-07-29 19:03     ` Marcelo Ricardo Leitner
2019-07-29 21:02   ` David Miller
2019-07-29 21:02     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.