* [PATCH] net: socket: drop unneeded likely() call around IS_ERR()
@ 2019-06-05 20:58 Enrico Weigelt, metux IT consult
2019-06-05 23:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-05 20:58 UTC (permalink / raw)
To: linux-kernel; +Cc: davem, netdev
From: Enrico Weigelt <info@metux.net>
IS_ERR() already calls unlikely(), so this extra likely() call
around the !IS_ERR() is not needed.
Signed-off-by: Enrico Weigelt <info@metux.net>
---
net/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/socket.c b/net/socket.c
index 38eec15..963df5d 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -429,7 +429,7 @@ static int sock_map_fd(struct socket *sock, int flags)
}
newfile = sock_alloc_file(sock, flags, NULL);
- if (likely(!IS_ERR(newfile))) {
+ if (!IS_ERR(newfile)) {
fd_install(fd, newfile);
return fd;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-05 23:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 20:58 [PATCH] net: socket: drop unneeded likely() call around IS_ERR() Enrico Weigelt, metux IT consult
2019-06-05 23:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).