diff mbox series

[-next] bus: ti-sysc: Use kzalloc for allocating only one thing

Message ID 20201229135147.23593-1-zhengyongjun3@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] bus: ti-sysc: Use kzalloc for allocating only one thing | expand

Commit Message

Zheng Yongjun Dec. 29, 2020, 1:51 p.m. UTC
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>
---
 drivers/bus/ti-sysc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tony Lindgren March 24, 2021, 11:44 a.m. UTC | #1
* Zheng Yongjun <zhengyongjun3@huawei.com> [201229 15:51]:
> Use kzalloc rather than kcalloc(1,...)

Thanks applying into omap-for-v5.13/ti-sysc.

Tony
diff mbox series

Patch

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 92ecf1a78ec7..e39b6da64c6d 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;