Skip to contentSkip to conversation

Remove unneeded test of 'task' in dump_trace()

PATCH New Jesper Juhl 1 participant 1 message Jun 10, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unneeded test of 'task' in dump_trace()

Remove unneeded test of task != NULL from
arch/i386/kernel/traps.c::dump_trace()

At the start of the function we have this test:

        if (!task)
                task = current;

so further down there's no need to test 'task'.

---

 arch/i386/kernel/traps.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/i386/kernel/traps.c +1 -1
index 90da057..f29a61d 100644
@@ -148,7 +148,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
 	if (!stack) {
 		unsigned long dummy;
 		stack = &dummy;
-		if (task && task != current)
+		if (task != current)
 			stack = (unsigned long *)task->thread.esp;
 	}