* [PATCH -next] bus: ti-sysc: Use kzalloc for allocating only one thing
@ 2020-12-29 13:51 Zheng Yongjun
2021-03-24 11:44 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-29 13:51 UTC (permalink / raw)
To: tony, linux-omap, linux-kernel; +Cc: Zheng Yongjun
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(-)
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;
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-24 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 13:51 [PATCH -next] bus: ti-sysc: Use kzalloc for allocating only one thing Zheng Yongjun
2021-03-24 11:44 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).