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 3/5] ASoC: sam9x5_wm8731: Return -ENODEV when probe does not find OF node
Date: Mon, 15 Jan 2018 08:53:51 +0100	[thread overview]
Message-ID: <20180115075351.GD10762@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/sam9x5_wm8731.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c
index e6c303ab869d..9db08826b32a 100644
--- a/sound/soc/atmel/sam9x5_wm8731.c
+++ b/sound/soc/atmel/sam9x5_wm8731.c
@@ -84,10 +84,8 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev)
 	struct sam9x5_drvdata *priv;
 	int ret;
 
-	if (!np) {
-		dev_err(&pdev->dev, "No device node supplied\n");
-		return -EINVAL;
-	}
+	if (!np)
+		return -ENODEV;
 
 	card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL);
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
-- 
2.15.1

  parent reply	other threads:[~2018-01-15  7:53 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 ` Ladislav Michl [this message]
2018-01-15  8:20   ` [PATCH 3/5] ASoC: sam9x5_wm8731: Return -ENODEV when probe does not find OF node 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 ` [PATCH 5/5] ASoC: atmel_wm8904: Return -ENODEV when probe does not find OF node Ladislav Michl

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=20180115075351.GD10762@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.