소스 검색

ASoC: Squash error codes from regmap down to -1 on read

The ASoC code always uses -1 as the error code due to reporting errors in
band with the value. Ensure we don't confuse anything by making sure we
don't pass actual error codes back into the rest of the code on read.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown 13 년 전
부모
커밋
3ebb5c9b10
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      sound/soc/soc-io.c

+ 1 - 1
sound/soc/soc-io.c

@@ -55,7 +55,7 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
 		if (ret == 0)
 			return val;
 		else
-			return ret;
+			return -1;
 	}
 
 	ret = snd_soc_cache_read(codec, reg, &val);