[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <563C6FAE.3060606@users.sourceforge.net>
Date: Fri, 6 Nov 2015 10:15:26 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-kernel@...r.kernel.org, Cliff Whickman <cpw@....com>,
Robin Holt <robinmholt@...il.com>
Cc: kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] SGI-XPC: Delete unnecessary checks before
unregister_sysctl_table()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 6 Nov 2015 10:08:46 +0100
The unregister_sysctl_table() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/misc/sgi-xp/xpc_main.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index 7f32712..8d4fcac 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -1046,9 +1046,7 @@ xpc_do_exit(enum xp_retval reason)
/* clear the interface to XPC's functions */
xpc_clear_interface();
- if (xpc_sysctl)
- unregister_sysctl_table(xpc_sysctl);
-
+ unregister_sysctl_table(xpc_sysctl);
xpc_teardown_partitions();
if (is_shub())
@@ -1331,9 +1329,7 @@ out_3:
(void)unregister_die_notifier(&xpc_die_notifier);
(void)unregister_reboot_notifier(&xpc_reboot_notifier);
out_2:
- if (xpc_sysctl)
- unregister_sysctl_table(xpc_sysctl);
-
+ unregister_sysctl_table(xpc_sysctl);
xpc_teardown_partitions();
out_1:
if (is_shub())
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists