All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Dmitry Osipenko <digetx@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Ion Agorria <ion@agorria.com>,
	alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [PATCH] ASoC: tegra: Fix a NULL vs IS_ERR() check
Date: Fri, 18 Jun 2021 16:44:24 +0300	[thread overview]
Message-ID: <YMyjOKFsPe9SietU@mwanda> (raw)

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>
---
 sound/soc/tegra/tegra_asoc_machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Dmitry Osipenko <digetx@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	kernel-janitors@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mark Brown <broonie@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Ion Agorria <ion@agorria.com>,
	linux-tegra@vger.kernel.org
Subject: [PATCH] ASoC: tegra: Fix a NULL vs IS_ERR() check
Date: Fri, 18 Jun 2021 16:44:24 +0300	[thread overview]
Message-ID: <YMyjOKFsPe9SietU@mwanda> (raw)

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>
---
 sound/soc/tegra/tegra_asoc_machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.30.2


             reply	other threads:[~2021-06-18 13:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 13:44 Dan Carpenter [this message]
2021-06-18 13:44 ` [PATCH] ASoC: tegra: Fix a NULL vs IS_ERR() check Dan Carpenter
2021-06-18 14:07 ` Dmitry Osipenko
2021-06-18 14:07   ` Dmitry Osipenko
2021-06-21 18:46 ` Mark Brown
2021-06-21 18:46   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMyjOKFsPe9SietU@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=clamor95@gmail.com \
    --cc=digetx@gmail.com \
    --cc=ion@agorria.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.