Commit 765d3a2a authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

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: 727de4fb ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version")
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240628095831.207942-2-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2e068fe0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment