All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: alsa-devel@alsa-project.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	SF Markus Elfring <elfring@users.sourceforge.net>
Subject: [PATCH 5/5] ASoC: atmel_wm8904: Return -ENODEV when probe does not find OF node
Date: Mon, 15 Jan 2018 08:54:58 +0100	[thread overview]
Message-ID: <20180115075458.GF10762@lenoch> (raw)
In-Reply-To: <20180115075213.GA10762@lenoch>

Probe should fail with -ENODEV when called with NULL pdev->dev.of_node.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 sound/soc/atmel/atmel_wm8904.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c
index fbc10f61eb55..39a73c4d19ec 100644
--- a/sound/soc/atmel/atmel_wm8904.c
+++ b/sound/soc/atmel/atmel_wm8904.c
@@ -85,10 +85,8 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev)
 	struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink;
 	int ret;
 
-	if (!np) {
-		dev_err(&pdev->dev, "only device tree supported\n");
-		return -EINVAL;
-	}
+	if (!np)
+		return -ENODEV;
 
 	ret = snd_soc_of_parse_card_name(card, "atmel,model");
 	if (ret) {
-- 
2.15.1

      parent reply	other threads:[~2018-01-15  7:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  7:52 [PATCH 0/5] ASoC: (minor) atmel cleanup Ladislav Michl
2018-01-15  7:52 ` [PATCH 1/5] ASoC: sam9g20_wm8731: use dev_*() logging functions Ladislav Michl
2018-01-22 12:26   ` Applied "ASoC: sam9g20_wm8731: use dev_*() logging functions" to the asoc tree Mark Brown
2018-01-15  7:53 ` [PATCH 2/5] ASoC: sam9x5_wm8731: Drop 'ASoC' prefix from error messages Ladislav Michl
2018-01-22 12:26   ` Applied "ASoC: sam9x5_wm8731: Drop 'ASoC' prefix from error messages" to the asoc tree Mark Brown
2018-01-15  7:53 ` [PATCH 3/5] ASoC: sam9x5_wm8731: Return -ENODEV when probe does not find OF node Ladislav Michl
2018-01-15  8:20   ` Alexandre Belloni
2018-01-15  9:11     ` Ladislav Michl
2018-01-15  9:22       ` Alexandre Belloni
2018-01-15  7:54 ` [PATCH 4/5] ASoC: sam9x5_wm8731: Fix OF node reference counting Ladislav Michl
2018-01-15  8:46   ` Alexandre Belloni
2018-01-15  9:08     ` Ladislav Michl
2018-01-15  7:54 ` Ladislav Michl [this message]

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=20180115075458.GF10762@lenoch \
    --to=ladis@linux-mips.org \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=elfring@users.sourceforge.net \
    --cc=lgirdwood@gmail.com \
    --cc=nicolas.ferre@microchip.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.