projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c8fe58
)
soundwire: intel: Use kzalloc for allocating only one thing
author
Zheng Yongjun
<zhengyongjun3@huawei.com>
Tue, 29 Dec 2020 13:50:12 +0000
(21:50 +0800)
committer
Vinod Koul
<vkoul@kernel.org>
Wed, 6 Jan 2021 06:00:02 +0000
(11:30 +0530)
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>
Link:
https://lore.kernel.org/r/20201229135012.23472-1-zhengyongjun3@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel.c
patch
|
blob
|
history
diff --git
a/drivers/soundwire/intel.c
b/drivers/soundwire/intel.c
index 66adb258a425825476d8232c9424fa44cae832d0..10b60b7b17bb7a7055f3b7aaa78aef28b791e80b 100644
(file)
--- a/
drivers/soundwire/intel.c
+++ b/
drivers/soundwire/intel.c
@@
-967,7
+967,7
@@
static int intel_hw_params(struct snd_pcm_substream *substream,
}
/* Port configuration */
- pconfig = k
calloc(1,
sizeof(*pconfig), GFP_KERNEL);
+ pconfig = k
zalloc(
sizeof(*pconfig), GFP_KERNEL);
if (!pconfig) {
ret = -ENOMEM;
goto error;