summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-29 21:51:47 +0800
committerTony Lindgren <tony@atomide.com>2021-03-24 13:44:04 +0200
commitd995d3d025bbd2d89abf12418f20d19bc0cb0130 (patch)
tree091f89d9cf1b7e2cbb164d51cc538ffae5dc4468 /drivers/bus
parent52fbb5aabb5cf621627dff10783f4fd2a4828aef (diff)
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 <zhengyongjun3@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/ti-sysc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index cd32eaff3d83..8880259b41ae 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -288,7 +288,7 @@ static int sysc_add_named_clock_from_child(struct sysc *ddata,
* limit for clk_get(). If cl ever needs to be freed, it should be done
* with clkdev_drop().
*/
- cl = kcalloc(1, sizeof(*cl), GFP_KERNEL);
+ cl = kzalloc(sizeof(*cl), GFP_KERNEL);
if (!cl)
return -ENOMEM;