From: Markus Elfring Date: Sun, 16 Nov 2014 13:18:28 +0000 (+0100) Subject: PM / hibernate: Deletion of an unnecessary check before the function call "vfree" X-Git-Tag: v3.19-rc1~129^2~3^3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c45de0d51a3d93267ee100bff8c4632b1d49e8f;p=karo-tx-linux.git PM / hibernate: Deletion of an unnecessary check before the function call "vfree" 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 Signed-off-by: Rafael J. Wysocki --- diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 2c9d6d50a816..570aff817543 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -1375,7 +1375,7 @@ out_clean: kthread_stop(data[thr].thr); vfree(data); } - if (page) vfree(page); + vfree(page); return ret; }