[PATCH] ASoC: core: replace PTR_RET with PTR_ERR_OR_ZERO

From: Duan Jiong
Date: Fri Apr 11 2014 - 06:06:14 EST


PTR_RET is deprecated. Do not recommend its usage anymore.
Use PTR_ERR_OR_ZERO instead.

Signed-off-by: Duan Jiong <duanj.fnst@xxxxxxxxxxxxxx>
---
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..bb7382e 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_OR_ZERO(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_OR_ZERO(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_OR_ZERO(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_OR_ZERO(state);
}
cfg->pstate_run = state;

--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/