Commit 781b0203 authored by Markus Elfring's avatar Markus Elfring Committed by Ingo Molnar

sched, sysctl: Delete an unnecessary check before unregister_sysctl_table()

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/5597877E.3060503@users.sourceforge.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 3fe33bcd
...@@ -5311,8 +5311,7 @@ static void register_sched_domain_sysctl(void) ...@@ -5311,8 +5311,7 @@ static void register_sched_domain_sysctl(void)
/* may be called multiple times per register */ /* may be called multiple times per register */
static void unregister_sched_domain_sysctl(void) static void unregister_sched_domain_sysctl(void)
{ {
if (sd_sysctl_header) unregister_sysctl_table(sd_sysctl_header);
unregister_sysctl_table(sd_sysctl_header);
sd_sysctl_header = NULL; sd_sysctl_header = NULL;
if (sd_ctl_dir[0].child) if (sd_ctl_dir[0].child)
sd_free_ctl_entry(&sd_ctl_dir[0].child); sd_free_ctl_entry(&sd_ctl_dir[0].child);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment