Skip to content

Commit d995d3d

Browse files
Zheng Yongjuntmlind
authored andcommitted
bus: ti-sysc: Use kzalloc for allocating only one thing
Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ - kcalloc(1, + kzalloc( ...) // </smpl> Signed-off-by: Zheng Yongjun <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 52fbb5a commit d995d3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bus/ti-sysc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static int sysc_add_named_clock_from_child(struct sysc *ddata,
288288
* limit for clk_get(). If cl ever needs to be freed, it should be done
289289
* with clkdev_drop().
290290
*/
291-
cl = kcalloc(1, sizeof(*cl), GFP_KERNEL);
291+
cl = kzalloc(sizeof(*cl), GFP_KERNEL);
292292
if (!cl)
293293
return -ENOMEM;
294294

0 commit comments

Comments
 (0)