gpu: ion: Fix bug in ion shrinker
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 13 Dec 2013 22:24:38 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:41 +0000 (08:55 -0800)
The high variable was sometimes used uninitialized

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_page_pool.c

index e59da3a..df6e29c 100644 (file)
@@ -203,8 +203,7 @@ static int ion_page_pool_shrink(struct shrinker *shrinker,
        bool high;
        int nr_to_scan = sc->nr_to_scan;
 
-       if (sc->gfp_mask & __GFP_HIGHMEM)
-               high = true;
+       high = sc->gfp_mask & __GFP_HIGHMEM;
 
        if (nr_to_scan == 0)
                return ion_page_pool_total(high);