diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-06-18 16:44:24 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 13:06:27 +0100 |
commit | 3aed3ddf9639a4f915984177ff8a2253f3f8acfe (patch) | |
tree | 9ff09958eb612cc79db60206f84840a1c89b9385 /sound | |
parent | 77b7bae7802848feabe37a92533bee64387906e7 (diff) |
ASoC: tegra: Fix a NULL vs IS_ERR() check
The tegra_machine_parse_phandle() function doesn't return NULL, it returns
error pointers.
Fixes: cc8f70f56039 ("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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra_asoc_machine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index a53aec361a77..735909310a26 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -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; |