Unverified Commit 9d3fcd0e authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

ASoC: mediatek: mt8189: remove unnecessary NULL check



Smatch complains that the call to snd_soc_component_get_drvdata(component)
will dereference "component" so this NULL check is too late.  The probe()
function will never be called with a NULL component pointer so just
delete the check.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aScUKqCEhSIZoOmg@stanley.mountain


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 900baa6e
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2352,12 +2352,10 @@ static int mt8189_afe_component_probe(struct snd_soc_component *component)
{
	struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);

	if (component) {
	/* enable clock for regcache get default value from hw */
	pm_runtime_get_sync(afe->dev);
	mtk_afe_add_sub_dai_control(component);
	pm_runtime_put_sync(afe->dev);
	}

	return 0;
}