diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-06-28 11:58:31 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-01 21:07:29 +0200 |
commit | 765d3a2aa195882e231835f5d9ac4d99affc8c07 (patch) | |
tree | 25f9d09a1b85413584337ea9162344e57c89e46d | |
parent | ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err (diff) | |
download | linux-765d3a2aa195882e231835f5d9ac4d99affc8c07.tar.xz linux-765d3a2aa195882e231835f5d9ac4d99affc8c07.zip |
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>
-rw-r--r-- | sound/soc/codecs/lpass-wsa-macro.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index 8351f0974e6a..b4e7139bac61 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; } |