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-wsa-macro: Fix using NULL pointer in probe() dev_err

The 'wsa->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: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240628095831.207942-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
765d3a2a 2e068fe0

+1 -1
+1 -1
sound/soc/codecs/lpass-wsa-macro.c
··· 2800 2800 break; 2801 2801 2802 2802 default: 2803 - dev_err(wsa->dev, "Unsupported Codec version (%d)\n", wsa->codec_version); 2803 + dev_err(dev, "Unsupported Codec version (%d)\n", wsa->codec_version); 2804 2804 return -EINVAL; 2805 2805 } 2806 2806