Commit 2e068fe0 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

ASoC: codecs: lpass-rx-macro: Fix using NULL pointer in probe() dev_err

The 'rx->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: dbacef05 ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
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-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f1afb360
......@@ -3842,7 +3842,7 @@ static int rx_macro_probe(struct platform_device *pdev)
rx_2_5_defaults, sizeof(rx_2_5_defaults));
break;
default:
dev_err(rx->dev, "Unsupported Codec version (%d)\n", rx->codec_version);
dev_err(dev, "Unsupported Codec version (%d)\n", rx->codec_version);
ret = -EINVAL;
goto err;
}
......
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