From patchwork Thu Mar 31 18:23:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 8715301 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 000D29F36E for ; Thu, 31 Mar 2016 18:24:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DDDD1202B8 for ; Thu, 31 Mar 2016 18:24:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A779920295 for ; Thu, 31 Mar 2016 18:24:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B6DE82669CA; Thu, 31 Mar 2016 20:24:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C49D1266902; Thu, 31 Mar 2016 20:23:32 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7FC37266909; Thu, 31 Mar 2016 20:23:31 +0200 (CEST) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by alsa0.perex.cz (Postfix) with ESMTP id 3226C2667D1 for ; Thu, 31 Mar 2016 20:23:24 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id f198so12431770wme.0 for ; Thu, 31 Mar 2016 11:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7KWHQASgZsd5sstDRZ2nd6X3lfxQ+putRnosqavHUwA=; b=B8YL7r1rL4Cy9XDU/zRSlpwy9N6s3/OXo5HNXubaZb98qkb9KSYuK5/PNpXCksgVei w9HRBqcU++4acFmegcjvQauQffYo/fsOJqDCGQbEPZC15TDk+oDB0p5wEU26B63wY68c UoIUs9crX9GRZXv0FgIjtn1UKCEdWtDZ9CHt4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7KWHQASgZsd5sstDRZ2nd6X3lfxQ+putRnosqavHUwA=; b=fHn8sToaqsqHw/uFggdXrWf75fWB/5watw2oxqLq40tf4/HcI0GpT3F/33eFNWfnyG AEY3iSAwd7GMCKz4FDpuWL2SbWQJXYnCrFZlaW6BuewKTVz/zC9Z5aJ46biojX7CQkBe 1SSila+BTF0vkdgvDjK1/nQq6UaEOhh/bld/mpBIadcN0Z+LeQDtRh88N6JIl2xJGXVR rLZBr9H9VXGuxivz5xU6doMTudrVuIP2Mr4KVamMTiKIyxlFLz/O2XMmlc3g9N93OJHP w/F4o5ihVMjJ7VTgBzOleOkNZIy9+eWAqU3OFFaumqHVTncAmagbLSRI9O6oRwOdWxzz 705g== X-Gm-Message-State: AD7BkJL3gRaIK3oJO9cMkmoQrC7KDBt2r+md3jeUxyEzlAWzIsx0ifNv42r8t6eTtQ44wPzl X-Received: by 10.194.83.101 with SMTP id p5mr368772wjy.141.1459448604006; Thu, 31 Mar 2016 11:23:24 -0700 (PDT) Received: from localhost.localdomain (host-92-17-247-99.as13285.net. [92.17.247.99]) by smtp.gmail.com with ESMTPSA id y3sm26122448wmy.17.2016.03.31.11.23.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Mar 2016 11:23:23 -0700 (PDT) From: Srinivas Kandagatla To: Mark Brown , alsa-devel@alsa-project.org, kwestfie@codeaurora.org Date: Thu, 31 Mar 2016 19:23:15 +0100 Message-Id: <1459448595-18620-3-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459448595-18620-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1459448595-18620-1-git-send-email-srinivas.kandagatla@linaro.org> Cc: plai@codeaurora.org, Srinivas Kandagatla , tiwai@suse.com Subject: [alsa-devel] [PATCH v2 2/2] ASoC: qcom: remove IS_ERR_VALUE usage on int. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Srinivas Kandagatla --- Changes since v1 - split the patch into two as suggested by Mark. sound/soc/qcom/lpass-platform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index f5cae01..db000c6 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/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, SNDRV_PCM_STREAM_PLAYBACK); - if (IS_ERR_VALUE(data->rdma_ch)) + if (data->rdma_ch < 0) return data->rdma_ch; 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, SNDRV_PCM_STREAM_CAPTURE); - if (IS_ERR_VALUE(data->wrdma_ch)) + if (data->wrdma_ch < 0) { + ret = data->wrdma_ch; goto capture_alloc_err; + } drvdata->substream[data->wrdma_ch] = csubstream;