All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound: soc: Use PTR_RET function
@ 2013-03-25 14:33 Alexandru Gheorghiu
  2013-03-26 14:12 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-25 14:33 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-kernel,
	Alexandru Gheorghiu

Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
 sound/soc/soc-io.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 29183ef..8ca9ecc 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
 		return -EINVAL;
 	}
 
-	if (IS_ERR(codec->control_data))
-		return PTR_ERR(codec->control_data);
-
-	return 0;
+	return PTR_RET(codec->control_data);
 }
 EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
 #else
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sound: soc: Use PTR_RET function
  2013-03-25 14:33 [PATCH] sound: soc: Use PTR_RET function Alexandru Gheorghiu
@ 2013-03-26 14:12 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-03-26 14:12 UTC (permalink / raw)
  To: Alexandru Gheorghiu
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

On Mon, Mar 25, 2013 at 04:33:59PM +0200, Alexandru Gheorghiu wrote:
> Used PTR_RET function instead of IS_ERR and PTR_ERR.
> Patch found using coccinelle.

Applied, thanks.  Please use subject lines matching the subsystem.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-26 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 14:33 [PATCH] sound: soc: Use PTR_RET function Alexandru Gheorghiu
2013-03-26 14:12 ` Mark Brown

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.