From: Jonghwan Choi Date: Fri, 21 Oct 2011 22:22:54 +0000 (+0200) Subject: PM / Clocks: Remove redundant NULL checks before kfree() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ab1e79b825a5cd8aeb3b34d89c9a89dea900056;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git PM / Clocks: Remove redundant NULL checks before kfree() Since kfree() checks it its argument is not NULL, it is not necessary to duplicate this check in __pm_clk_remove(). [rjw: Added the changelog.] Signed-off-by: Jonghwan Choi Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index b876e60a53ef..5f0f85d5c576 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -104,9 +104,7 @@ static void __pm_clk_remove(struct pm_clock_entry *ce) clk_put(ce->clk); } - if (ce->con_id) - kfree(ce->con_id); - + kfree(ce->con_id); kfree(ce); }