Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@linux.intel.com>,
	Liam Girdwood <lrg@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Brian Austin <brian.austin@cirrus.com>,
	Georgi Vlaev <joe@nucleusys.com>
Subject: [PATCH 1/2] ASoC: cs42l73: Return proper error code if device id mismatch
Date: Sat, 19 Nov 2011 10:15:53 +0800	[thread overview]
Message-ID: <1321668953.9341.1.camel@phoenix> (raw)

Return -ENODEV instead of 0 if device id mismatch.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/cs42l73.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index aadfd6b..3eed21e 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1370,6 +1370,7 @@ static __devinit int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 
 
 	if (devid != CS42L73_DEVID) {
+		ret = -ENODEV;
 		dev_err(&i2c_client->dev,
 			"CS42L73 Device ID (%X). Expected %X\n",
 			devid, CS42L73_DEVID);
-- 
1.7.5.4

             reply	other threads:[~2011-11-19  2:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19  2:15 Axel Lin [this message]
2011-11-19  2:17 ` [PATCH 2/2] ASoC: cs42l73: Show correct revision id Axel Lin
2011-11-21 17:06   ` Mark Brown
2011-11-21 17:06 ` [PATCH 1/2] ASoC: cs42l73: Return proper error code if device id mismatch 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=1321668953.9341.1.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=brian.austin@cirrus.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=joe@nucleusys.com \
    --cc=lrg@ti.com \
    --cc=vinod.koul@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox