Commit 3aed3ddf authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: tegra: Fix a NULL vs IS_ERR() check

The tegra_machine_parse_phandle() function doesn't return NULL, it returns
error pointers.

Fixes: cc8f70f5 ("ASoC: tegra: Unify ASoC machine drivers")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/YMyjOKFsPe9SietU@mwandaSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 77b7bae7
......@@ -409,7 +409,7 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
return PTR_ERR(np_codec);
np_i2s = tegra_machine_parse_phandle(dev, "nvidia,i2s-controller");
if (!np_i2s)
if (IS_ERR(np_i2s))
return PTR_ERR(np_i2s);
card->dai_link->cpus->of_node = np_i2s;
......
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