All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: core: use PTR_ERR instead of PTR_RET
@ 2014-04-15 20:39 Christoph Jaeger
  2014-04-18 16:20 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Jaeger @ 2014-04-15 20:39 UTC (permalink / raw)
  To: perex, tiwai, lgirdwood, broonie
  Cc: alsa-devel, linux-kernel, Christoph Jaeger

PTR_RET is deprecated. PTR_ERR_OR_ZERO should be used instead. However,
we already know that IS_ERR is true, and thus PTR_ERR_OR_ZERO would
never yield zero, so we can use PTR_ERR here.

Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
---
 sound/soc/soc-core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 051c006..2dc69845 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2153,28 +2153,28 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev,
 	p = devm_pinctrl_get(dev);
 	if (IS_ERR(p)) {
 		dev_err(dev, "Failed to get pinctrl\n");
-		return PTR_RET(p);
+		return PTR_ERR(p);
 	}
 	cfg->pctl = p;
 
 	state = pinctrl_lookup_state(p, "ac97-reset");
 	if (IS_ERR(state)) {
 		dev_err(dev, "Can't find pinctrl state ac97-reset\n");
-		return PTR_RET(state);
+		return PTR_ERR(state);
 	}
 	cfg->pstate_reset = state;
 
 	state = pinctrl_lookup_state(p, "ac97-warm-reset");
 	if (IS_ERR(state)) {
 		dev_err(dev, "Can't find pinctrl state ac97-warm-reset\n");
-		return PTR_RET(state);
+		return PTR_ERR(state);
 	}
 	cfg->pstate_warm_reset = state;
 
 	state = pinctrl_lookup_state(p, "ac97-running");
 	if (IS_ERR(state)) {
 		dev_err(dev, "Can't find pinctrl state ac97-running\n");
-		return PTR_RET(state);
+		return PTR_ERR(state);
 	}
 	cfg->pstate_run = state;
 
-- 
1.9.0


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

* Re: [PATCH] ASoC: core: use PTR_ERR instead of PTR_RET
  2014-04-15 20:39 [PATCH] ASoC: core: use PTR_ERR instead of PTR_RET Christoph Jaeger
@ 2014-04-18 16:20 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-18 16:20 UTC (permalink / raw)
  To: Christoph Jaeger; +Cc: perex, tiwai, lgirdwood, alsa-devel, linux-kernel

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

On Tue, Apr 15, 2014 at 10:39:01PM +0200, Christoph Jaeger wrote:
> PTR_RET is deprecated. PTR_ERR_OR_ZERO should be used instead. However,
> we already know that IS_ERR is true, and thus PTR_ERR_OR_ZERO would
> never yield zero, so we can use PTR_ERR here.

Applied, thanks.

[-- 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:[~2014-04-18 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15 20:39 [PATCH] ASoC: core: use PTR_ERR instead of PTR_RET Christoph Jaeger
2014-04-18 16:20 ` 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.