2013-03-25 14:34:43

by Alexandru Gheorghiu

[permalink] [raw]
Subject: [PATCH] sound: soc: Use PTR_RET function

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

Signed-off-by: Alexandru Gheorghiu <[email protected]>
---
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


2013-03-26 14:12:41

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] sound: soc: Use PTR_RET function

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.


Attachments:
(No filename) (224.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments