Commit 235ae89b authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Vinod Koul

soundwire: intel: 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: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20201229135012.23472-1-zhengyongjun3@huawei.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 5c8fe583
...@@ -967,7 +967,7 @@ static int intel_hw_params(struct snd_pcm_substream *substream, ...@@ -967,7 +967,7 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
} }
/* Port configuration */ /* Port configuration */
pconfig = kcalloc(1, sizeof(*pconfig), GFP_KERNEL); pconfig = kzalloc(sizeof(*pconfig), GFP_KERNEL);
if (!pconfig) { if (!pconfig) {
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment