Open coded arithmetic in allocator arguments is discouraged. Helper
functions like kcalloc or, in this case, devm_kcalloc are preferred.

Link: 
https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments

Signed-off-by: Ethan Carter Edwards <[email protected]>
---
 sound/soc/intel/avs/boards/max98373.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/boards/max98373.c 
b/sound/soc/intel/avs/boards/max98373.c
index 
6f25e66344b7a4b46d6598619b6b1362cad8c39e..970f82bf4ce8920b1965a0b81e8623ab5bf91ef1
 100644
--- a/sound/soc/intel/avs/boards/max98373.c
+++ b/sound/soc/intel/avs/boards/max98373.c
@@ -111,7 +111,7 @@ static int avs_create_dai_link(struct device *dev, const 
char *platform_name, in
        dl->name = devm_kasprintf(dev, GFP_KERNEL,
                                  AVS_STRING_FMT("SSP", "-Codec", ssp_port, 
tdm_slot));
        dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL);
-       dl->codecs = devm_kzalloc(dev, sizeof(*dl->codecs) * 2, GFP_KERNEL);
+       dl->codecs = devm_kcalloc(dev, 2, sizeof(*dl->codecs), GFP_KERNEL);
        if (!dl->name || !dl->cpus || !dl->codecs)
                return -ENOMEM;
 

-- 
2.48.1


Reply via email to