Because the task p is always guaranteed to be non-NULL.

Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
 arch/x86/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index c93fcfd..3c3ee89 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -730,7 +730,7 @@ unsigned long get_wchan(struct task_struct *p)
        unsigned long start, bottom, top, sp, fp, ip, ret = 0;
        int count = 0;
 
-       if (!p || p == current || p->state == TASK_RUNNING)
+       if (p == current || p->state == TASK_RUNNING)
                return 0;
 
        if (!try_get_task_stack(p))
-- 
1.8.3.1

Reply via email to