ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
Subsystems (5)
PATCH 1/1 ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
A devm_kzalloc() in asoc_qcom_lpass_cpu_platform_probe() could possibly return NULL pointer. NULL Pointer Dereference may be triggerred without addtional check.
Add a NULL check for the returned pointer.
--- sound/soc/qcom/lpass-cpu.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/qcom/lpass-cpu.c +3 -0
@@ -1243,6 +1243,9 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) drvdata->i2sctl =devm_kzalloc (&pdev->dev,sizeof (struct lpaif_i2sctl ),GFP_KERNEL ); +if (!drvdata->i2sctl) +return -ENOMEM ; +/* Initialize bitfields for dai I2SCTL register */ ret =lpass_cpu_init_i2sctl_bitfields (dev, drvdata->i2sctl, drvdata->lpaif_map);
Signature · 1 line
2.25.1
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: [email protected]" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] ASoC: qcom: Fix NULL Dereference in asoc_qcom_lpass_cpu_platform_probe()
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 9 lines · Gax-c
A
devm_kzalloc()inasoc_qcom_lpass_cpu_platform_probe()could possibly return NULL pointer. NULL Pointer Dereference may be triggerred without addtional check.
Add a NULL check for the returned pointer.Fixes b5022a36d28f ("ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers")Signed-off-by Zichen Xie <[email protected]>Reported-by Zichen Xie <[email protected]>Reported-by Zijie Zhao <[email protected]>Reported-by Chenyuan Yang <[email protected]>
Commit still needs improvements.
You ignored also Bjorn's review.
Best regards,
Krzysztof