staging: lowmemorykiller: remove bogus NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 8 Apr 2016 13:02:35 +0000 (16:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 00:58:02 +0000 (17:58 -0700)
The NULL checking here doesn't make sense, so it causes a static checker
warning.  It turns out that p->mm can't be NULL so the inconsistency is
harmless and we should just remove the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/lowmemorykiller.c

index c79f22425fa877904b06941c13745da9ea62fb8a..24d2745e943778200c64996510814756854fa461 100644 (file)
@@ -131,7 +131,7 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc)
                if (!p)
                        continue;
 
-               if (task_lmk_waiting(p) && p->mm &&
+               if (task_lmk_waiting(p) &&
                    time_before_eq(jiffies, lowmem_deathpending_timeout)) {
                        task_unlock(p);
                        rcu_read_unlock();