From: Zheng Yongjun Date: Tue, 29 Dec 2020 13:50:12 +0000 (+0800) Subject: soundwire: intel: Use kzalloc for allocating only one thing X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=235ae89b66767652f9e9e10946b8a38caf6a26f6;p=linux.git 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/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20201229135012.23472-1-zhengyongjun3@huawei.com Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 66adb258a4258..10b60b7b17bb7 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;