diff options
author | Dan Carpenter <[email protected]> | 2012-01-28 13:52:46 +0300 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2012-01-28 13:09:06 +0100 |
commit | d0caf292505d051b1026e85faf3a85e907566f31 (patch) | |
tree | eda525b9ff71123eafbbe2da24d789a089f3a592 | |
parent | e050e3f0a71bf7dc2c148b35caff0234decc8198 (diff) |
x86/dumpstack: Remove unneeded check in dump_trace()
Smatch complains that we have some inconsistent NULL checking.
If "task" were NULL then it would lead to a NULL dereference
later. We can remove this test because earlier on in the
function we have:
if (!task)
task = current;
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Frederic Weisbecker <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | arch/x86/kernel/dumpstack_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 6d728d9284bd..af7785ff5aa0 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c @@ -129,7 +129,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, if (!stack) { if (regs) stack = (unsigned long *)regs->sp; - else if (task && task != current) + else if (task != current) stack = (unsigned long *)task->thread.sp; else stack = &dummy; |