Skip to contentSkip to conversation

rds: remove the unneed NULL checking

PATCH Applied Wang Weidong 2 participants 2 messages May 8, 2014 – May 9, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rds: remove the unneed NULL checking

unregister_net_sysctl_table will check the ctl_table_header, so remove the unneed checking

---
 net/rds/iw_sysctl.c | 3 +--
 net/rds/sysctl.c    | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
net/rds/iw_sysctl.c +1 -2
index 89c9151..139239d 100644
@@ -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)
net/rds/sysctl.c +1 -2
index b5cb2aa..c3b0cd4 100644
@@ -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)
Signature · 1 line
1.7.12