From: Krzysztof Kozlowski Date: Fri, 28 Jun 2024 09:58:31 +0000 (+0200) Subject: ASoC: codecs: lpass-wsa-macro: Fix using NULL pointer in probe() dev_err X-Git-Tag: v6.11-rc1~108^2~6^2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=765d3a2aa195882e231835f5d9ac4d99affc8c07;p=thirdparty%2Flinux.git 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 Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20240628095831.207942-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 8351f0974e6a6..b4e7139bac619 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2800,7 +2800,7 @@ static int wsa_macro_probe(struct platform_device *pdev) break; default: - dev_err(wsa->dev, "Unsupported Codec version (%d)\n", wsa->codec_version); + dev_err(dev, "Unsupported Codec version (%d)\n", wsa->codec_version); return -EINVAL; }