The tegra_machine_parse_phandle() function doesn't return NULL, it returns
error pointers.
Fixes: 368c78fe23f5 ("ASoC: tegra: Unify ASoC machine drivers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/YMyjOKFsPe9SietU@mwanda
Signed-off-by: Mark Brown <broonie@kernel.org>
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;