rds: remove the unneed NULL checking
authorwangweidong <wangweidong1@huawei.com>
Thu, 8 May 2014 09:01:53 +0000 (17:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 May 2014 19:59:45 +0000 (15:59 -0400)
unregister_net_sysctl_table will check the ctl_table_header,
so remove the unneed checking

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/iw_sysctl.c
net/rds/sysctl.c

index 89c91515ed0c605b6ee63996d0c0a9692ea8fe91..139239d2cb228438e29f347b33035da15d5396c0 100644 (file)
@@ -111,8 +111,7 @@ static struct ctl_table rds_iw_sysctl_table[] = {
 
 void rds_iw_sysctl_exit(void)
 {
-       if (rds_iw_sysctl_hdr)
-               unregister_net_sysctl_table(rds_iw_sysctl_hdr);
+       unregister_net_sysctl_table(rds_iw_sysctl_hdr);
 }
 
 int rds_iw_sysctl_init(void)
index b5cb2aa08f33aa62ac5bff73684fc228f74dce7e..c3b0cd43eb56689e395581c4757402bad531e271 100644 (file)
@@ -94,8 +94,7 @@ static struct ctl_table rds_sysctl_rds_table[] = {
 
 void rds_sysctl_exit(void)
 {
-       if (rds_sysctl_reg_table)
-               unregister_net_sysctl_table(rds_sysctl_reg_table);
+       unregister_net_sysctl_table(rds_sysctl_reg_table);
 }
 
 int rds_sysctl_init(void)