Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err

The 'rx->dev' is assigned closer to the end of the probe() function, so
the dev_err() must not use it - it is still NULL at this point. Instead
there is already a local 'dev' variable.

Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240628095831.207942-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
2e068fe0 f1afb360

+1 -1
+1 -1
sound/soc/codecs/lpass-rx-macro.c
··· 3842 3842 rx_2_5_defaults, sizeof(rx_2_5_defaults)); 3843 3843 break; 3844 3844 default: 3845 - dev_err(rx->dev, "Unsupported Codec version (%d)\n", rx->codec_version); 3845 + dev_err(dev, "Unsupported Codec version (%d)\n", rx->codec_version); 3846 3846 ret = -EINVAL; 3847 3847 goto err; 3848 3848 }