Skip to content

Commit

Permalink
PM / Clocks: Remove redundant NULL checks before kfree()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonghwan Choi authored and Rafael J. Wysocki committed Oct 21, 2011
1 parent 7fef9fc commit 0ab1e79
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/base/power/clock_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0ab1e79

Please sign in to comment.