lkml.org 
[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ASoC: core: use PTR_ERR instead of PTR_RET
Date
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


\
 
 \ /
  Last update: 2014-04-15 23:01    [W:0.075 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site