]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PM / hibernate: Deletion of an unnecessary check before the function call "vfree"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 16 Nov 2014 13:18:28 +0000 (14:18 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 18 Nov 2014 01:49:40 +0000 (02:49 +0100)
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/swap.c

index 2c9d6d50a8166f5b84a011b057d18b78e57ab674..570aff817543fc8484b08ecdba09da4751acf060 100644 (file)
@@ -1375,7 +1375,7 @@ out_clean:
                                kthread_stop(data[thr].thr);
                vfree(data);
        }
-       if (page) vfree(page);
+       vfree(page);
 
        return ret;
 }