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 e59da3a5ed9f018ca31c14a06027983cd4ddbc67..df6e29c1854e5e3b7b2a91f54c39d14394b63bde 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);