Skip to content

Commit

Permalink
rds: remove the unneed NULL checking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wangweidong authored and David S. Miller committed May 9, 2014
1 parent 97e7282 commit be7faf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions net/rds/iw_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions net/rds/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit be7faf7

Please sign in to comment.