[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362482829-10455-1-git-send-email-sachin.kamat@linaro.org>
Date: Tue, 5 Mar 2013 16:57:09 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, sachin.kamat@...aro.org
Subject: [PATCH 1/1] net: ipv4: Remove redundant NULL check
kfree on a null pointer is a NO-OP. Hence null check is not necessary.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
---
Compile tested on linux-next tree (20130305).
---
net/ipv4/tcp.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 47e854f..3aa5d54 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -992,10 +992,8 @@ static inline int select_size(const struct sock *sk, bool sg)
void tcp_free_fastopen_req(struct tcp_sock *tp)
{
- if (tp->fastopen_req != NULL) {
- kfree(tp->fastopen_req);
- tp->fastopen_req = NULL;
- }
+ kfree(tp->fastopen_req);
+ tp->fastopen_req = NULL;
}
static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *size)
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists