diff mbox series

[1/1] net: rds: remove unnecessary NULL check

Message ID 20181230152411.15096-1-yanjun.zhu@oracle.com (mailing list archive)
State Accepted
Commit 4087d2bc0d9469835f8d19d63a4a56739e5b8c5b
Headers show
Series [1/1] net: rds: remove unnecessary NULL check | expand

Commit Message

Zhu Yanjun Dec. 30, 2018, 3:24 p.m. UTC
In kfree, the NULL check is done.

Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
 net/rds/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Jan. 1, 2019, 5:54 p.m. UTC | #1
From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Sun, 30 Dec 2018 23:24:11 +0800

> In kfree, the NULL check is done.
> 
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>

Applied.
diff mbox series

Patch

diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index b9bbcf3d6c63..c16f0a362c32 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -623,7 +623,7 @@  static void __net_exit rds_tcp_exit_net(struct net *net)
 	if (rtn->rds_tcp_sysctl)
 		unregister_net_sysctl_table(rtn->rds_tcp_sysctl);
 
-	if (net != &init_net && rtn->ctl_table)
+	if (net != &init_net)
 		kfree(rtn->ctl_table);
 }