소스 검색

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>
Jonghwan Choi 14 년 전
부모
커밋
0ab1e79b82
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      drivers/base/power/clock_ops.c

+ 1 - 3
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);
 }