ASoC: core: use PTR_ERR instead of PTR_RET
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> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
		
					parent
					
						
							
								aa0258adf6
							
						
					
				
			
			
				commit
				
					
						b7580cde70
					
				
			
		
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -2075,28 +2075,28 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev, | ||||||
| 	p = devm_pinctrl_get(dev); | 	p = devm_pinctrl_get(dev); | ||||||
| 	if (IS_ERR(p)) { | 	if (IS_ERR(p)) { | ||||||
| 		dev_err(dev, "Failed to get pinctrl\n"); | 		dev_err(dev, "Failed to get pinctrl\n"); | ||||||
| 		return PTR_RET(p); | 		return PTR_ERR(p); | ||||||
| 	} | 	} | ||||||
| 	cfg->pctl = p; | 	cfg->pctl = p; | ||||||
| 
 | 
 | ||||||
| 	state = pinctrl_lookup_state(p, "ac97-reset"); | 	state = pinctrl_lookup_state(p, "ac97-reset"); | ||||||
| 	if (IS_ERR(state)) { | 	if (IS_ERR(state)) { | ||||||
| 		dev_err(dev, "Can't find pinctrl state ac97-reset\n"); | 		dev_err(dev, "Can't find pinctrl state ac97-reset\n"); | ||||||
| 		return PTR_RET(state); | 		return PTR_ERR(state); | ||||||
| 	} | 	} | ||||||
| 	cfg->pstate_reset = state; | 	cfg->pstate_reset = state; | ||||||
| 
 | 
 | ||||||
| 	state = pinctrl_lookup_state(p, "ac97-warm-reset"); | 	state = pinctrl_lookup_state(p, "ac97-warm-reset"); | ||||||
| 	if (IS_ERR(state)) { | 	if (IS_ERR(state)) { | ||||||
| 		dev_err(dev, "Can't find pinctrl state ac97-warm-reset\n"); | 		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; | 	cfg->pstate_warm_reset = state; | ||||||
| 
 | 
 | ||||||
| 	state = pinctrl_lookup_state(p, "ac97-running"); | 	state = pinctrl_lookup_state(p, "ac97-running"); | ||||||
| 	if (IS_ERR(state)) { | 	if (IS_ERR(state)) { | ||||||
| 		dev_err(dev, "Can't find pinctrl state ac97-running\n"); | 		dev_err(dev, "Can't find pinctrl state ac97-running\n"); | ||||||
| 		return PTR_RET(state); | 		return PTR_ERR(state); | ||||||
| 	} | 	} | ||||||
| 	cfg->pstate_run = state; | 	cfg->pstate_run = state; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Christoph Jaeger
				Christoph Jaeger