All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] rds: remove the unneed NULL checking
@ 2014-05-08  9:01 Wang Weidong
  2014-05-09 20:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Weidong @ 2014-05-08  9:01 UTC (permalink / raw)
  To: David Miller; +Cc: chien.yen, rds-devel, netdev

unregister_net_sysctl_table will check the ctl_table_header,
so remove the unneed checking

Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
 net/rds/iw_sysctl.c | 3 +--
 net/rds/sysctl.c    | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/rds/iw_sysctl.c b/net/rds/iw_sysctl.c
index 89c9151..139239d 100644
--- a/net/rds/iw_sysctl.c
+++ b/net/rds/iw_sysctl.c
@@ -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)
diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
index b5cb2aa..c3b0cd4 100644
--- a/net/rds/sysctl.c
+++ b/net/rds/sysctl.c
@@ -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)
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] rds: remove the unneed NULL checking
  2014-05-08  9:01 [PATCH net-next] rds: remove the unneed NULL checking Wang Weidong
@ 2014-05-09 20:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-05-09 20:00 UTC (permalink / raw)
  To: wangweidong1; +Cc: chien.yen, rds-devel, netdev

From: Wang Weidong <wangweidong1@huawei.com>
Date: Thu, 8 May 2014 17:01:53 +0800

> unregister_net_sysctl_table will check the ctl_table_header,
> so remove the unneed checking
> 
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-09 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08  9:01 [PATCH net-next] rds: remove the unneed NULL checking Wang Weidong
2014-05-09 20:00 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.