PM / Clocks: Remove redundant NULL checks before kfree()
authorJonghwan Choi <jhbird.choi@samsung.com>
Fri, 21 Oct 2011 22:22:54 +0000 (00:22 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 21 Oct 2011 22:22:54 +0000 (00:22 +0200)
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 <jhbird.choi@samsung.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/clock_ops.c

index b876e60..5f0f85d 100644 (file)
@@ -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);
 }