mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
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: 727de4fbc5
("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>
This commit is contained in:
parent
2e068fe01e
commit
765d3a2aa1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user