Skip to content

Commit

Permalink
net: rds: remove unnecessary NULL check
Browse files Browse the repository at this point in the history
In kfree, the NULL check is done.

Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zhu Yanjun authored and David S. Miller committed Jan 1, 2019
1 parent 2b96547 commit 4087d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rds/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 4087d2b

Please sign in to comment.