Skip to contentSkip to conversation

PM / Clocks: Remove redundant NULL checks before kfree()

PATCH RESEND New jhbird.choi at samsung.com 2 participants 2 messages Oct 19, 2011 – Oct 21, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 PM / Clocks: Remove redundant NULL checks before kfree()

From: Jonghwan Choi <[email protected]>

---
 drivers/base/power/clock_ops.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/base/power/clock_ops.c +1 -3
index b97294e..3ecc303 100644
@@ -114,9 +114,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);
 }
 
Signature · 1 line
1.7.1
#1 lore raw

PATCH RESEND 1/1 PM / Clocks: Remove redundant NULL checks before kfree()

Quoted 3 lines · jhbird.choi at samsung.com

From: Jonghwan Choi <[email protected]>

Applied to linux-pm/linux-next, but I didn't have to resend it.

Thanks,
Rafael

Quoted 20 lines
---
 drivers/base/power/clock_ops.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/base/power/clock_ops.c +1 -3
index b97294e..3ecc303 100644
@@ -114,9 +114,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);
 }