| From 7f71d2623cd1d37e5ffd6a2c55fb5d4d2a990eb3 Mon Sep 17 00:00:00 2001 |
| From: Jonghwan Choi <jhbird.choi@samsung.com> |
| Date: Sat, 22 Oct 2011 00:22:54 +0200 |
| Subject: 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 <jhbird.choi@samsung.com> |
| Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> |
| (cherry picked from commit 0ab1e79b825a5cd8aeb3b34d89c9a89dea900056) |
| |
| Signed-off-by: Simon Horman <horms@verge.net.au> |
| --- |
| drivers/base/power/clock_ops.c | 4 +--- |
| 1 file changed, 1 insertion(+), 3 deletions(-) |
| |
| diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c |
| index b876e60..5f0f85d 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); |
| } |
| |
| -- |
| 1.7.10.1.362.g242cab3 |
| |