summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-29 21:50:12 +0800
committerVinod Koul <vkoul@kernel.org>2021-01-06 11:30:02 +0530
commit235ae89b66767652f9e9e10946b8a38caf6a26f6 (patch)
tree3c940c04beb0423206ee35f5a793566e7fc0e79b /drivers/soundwire
parent5c8fe583cce542aa0b84adc939ce85293de36e5e (diff)
downloadlinux-235ae89b66767652f9e9e10946b8a38caf6a26f6.tar.gz
linux-235ae89b66767652f9e9e10946b8a38caf6a26f6.tar.xz
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: 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>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 66adb258a425..10b60b7b17bb 100644
--- 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 = kcalloc(1, sizeof(*pconfig), GFP_KERNEL);
+ pconfig = kzalloc(sizeof(*pconfig), GFP_KERNEL);
if (!pconfig) {
ret = -ENOMEM;
goto error;