瀏覽代碼

ASoC: qcom: remove IS_ERR_VALUE usage on int.

IS_ERR_VALUE should be used only with unsigned long type,
signed types should use comparison 'ret < 0'

This patch removes such usages.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla 9 年之前
父節點
當前提交
cef794f764
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      sound/soc/qcom/lpass-platform.c

+ 4 - 2
sound/soc/qcom/lpass-platform.c

@@ -491,7 +491,7 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
 			data->rdma_ch = v->alloc_dma_channel(drvdata,
 			data->rdma_ch = v->alloc_dma_channel(drvdata,
 						SNDRV_PCM_STREAM_PLAYBACK);
 						SNDRV_PCM_STREAM_PLAYBACK);
 
 
-		if (IS_ERR_VALUE(data->rdma_ch))
+		if (data->rdma_ch < 0)
 			return data->rdma_ch;
 			return data->rdma_ch;
 
 
 		drvdata->substream[data->rdma_ch] = psubstream;
 		drvdata->substream[data->rdma_ch] = psubstream;
@@ -518,8 +518,10 @@ static int lpass_platform_pcm_new(struct snd_soc_pcm_runtime *soc_runtime)
 			data->wrdma_ch = v->alloc_dma_channel(drvdata,
 			data->wrdma_ch = v->alloc_dma_channel(drvdata,
 						SNDRV_PCM_STREAM_CAPTURE);
 						SNDRV_PCM_STREAM_CAPTURE);
 
 
-		if (IS_ERR_VALUE(data->wrdma_ch))
+		if (data->wrdma_ch < 0) {
+			ret = data->wrdma_ch;
 			goto capture_alloc_err;
 			goto capture_alloc_err;
+		}
 
 
 		drvdata->substream[data->wrdma_ch] = csubstream;
 		drvdata->substream[data->wrdma_ch] = csubstream;