Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rds: remove the unneed NULL checking

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>

authored by

wangweidong and committed by
David S. Miller
be7faf71 97e72829

+2 -4
+1 -2
net/rds/iw_sysctl.c
··· 111 111 112 112 void rds_iw_sysctl_exit(void) 113 113 { 114 - if (rds_iw_sysctl_hdr) 115 - unregister_net_sysctl_table(rds_iw_sysctl_hdr); 114 + unregister_net_sysctl_table(rds_iw_sysctl_hdr); 116 115 } 117 116 118 117 int rds_iw_sysctl_init(void)
+1 -2
net/rds/sysctl.c
··· 94 94 95 95 void rds_sysctl_exit(void) 96 96 { 97 - if (rds_sysctl_reg_table) 98 - unregister_net_sysctl_table(rds_sysctl_reg_table); 97 + unregister_net_sysctl_table(rds_sysctl_reg_table); 99 98 } 100 99 101 100 int rds_sysctl_init(void)