From patchwork Tue Jun 26 09:20:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 139923 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5006498lji; Tue, 26 Jun 2018 02:23:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIUQsrKfT4uSAEZjWV8i21nTcdsZlpqGIQzVnYljCQOziA8gaAAymPrLHP81zj7Jkw+eDKq X-Received: by 2002:a63:24c4:: with SMTP id k187-v6mr655688pgk.434.1530004990988; Tue, 26 Jun 2018 02:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530004990; cv=none; d=google.com; s=arc-20160816; b=U/Q3JAf6VKu+UJ+mfknb4/4Za5e0lb8X0ClaxZ3DZFvCMgoGirzA5wHLYxuAyc0nIG AHXJ5sNGOAypKkDDpNK+luYFwURCz7/RTLi9u1PL8JpQBzmLFP8P6KZUJuwD/lAPdurI cyY4wi1WmIvVjpZyjYsKGR5g3kNzspwHMeKioCyrGjmWTlH7Ce0pTke9+0BIHg0PEq2K oSIysHxv8nzfYRmBjP5WI0rpe+XCmYFz1Jaomh6MaFQQRpBTXAECQPkvSOcgeXOecsEP EyIdf9/HuVfP48CydAlXSTEW8dzV1ETfKxBBOP3h2L/gwLRu8ROBYnZ14aVc9qITuKXu aHoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=E2b1SF4lGljXSzLfPBJn6UYbkgznGupv6vAh0HdCRDw=; b=koworN745jDsZGDFOHE9XzVza1kq0O9aqml4tH17cAxcWvYzXUX28j4VQMHP2iVL1S JJPYX5oYRSnDFz78SfzA4rYgzl3AnJn9TCDWutmhH0/a1eJRtffKbIS6W5muxnrUASCO MfP9SGaMPaqjsZbzdn1qRbyfBLsWoApwHdMi+mhETvTbd6dqxTXo6/oYHwXfmc2vijev kzL2ftL8M7QNefHMislLBoGQN0eiEUD5+d9qB54XbWgYgtlj5/xyUCcheDBhsta7FGuQ U+hrenKWOm6RqLZgh5Bv8rFG2lVsmHTc5beqUXk4pGDQudIUXUmJf6C3IMvJ8Z/Nsj8l 8d0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WiSBo2VI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a100-v6si613071pli.122.2018.06.26.02.23.10; Tue, 26 Jun 2018 02:23:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WiSBo2VI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934060AbeFZJXJ (ORCPT + 31 others); Tue, 26 Jun 2018 05:23:09 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:34248 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933876AbeFZJWg (ORCPT ); Tue, 26 Jun 2018 05:22:36 -0400 Received: by mail-wm0-f48.google.com with SMTP id l15-v6so14706563wmc.1 for ; Tue, 26 Jun 2018 02:22:36 -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=E2b1SF4lGljXSzLfPBJn6UYbkgznGupv6vAh0HdCRDw=; b=WiSBo2VIvv0zIiPAaiAstN0mLB+Ie6xfF4IWD1J9gArWonO8jGdVczMzamSNW52mAt valQvT10y+MlBNSzOZkn4OHO7mHzkmlsewH6gcIkXbO/1mxSfRnSr0yzlcTN7tT/bTAX ES2G8QELF74VCqJlGy/gBbkNxz95kpLW2Qs44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E2b1SF4lGljXSzLfPBJn6UYbkgznGupv6vAh0HdCRDw=; b=sgtvluz17y9GtiegRlaPULRqbQyaQcdJBOLNUx/2iy5TFfcaJSt8oYyIV0ktETsgYw guzObXJpdj6K9VHhQKrM6bn2a/AwVrjBYLAAm1nSylv7a2JLD1czjJTRWgbiMvcRrpRQ H48CiUZ2P3jQUoa5M761nY58LYL3rlTZj2Fw0nH/yx75bAiPBX3L/8hlJpbsGeyP1Ntq DTCG3BUpo80CrioD6m8Gn1iG/+vTLuxxlDkLYkmLuf2JxDFNjpt4cCFTp9wAG294hEuY JMxlcWO0lME4zj/b3SeEufj24AKLClQ1cjdLWKTSDJFHkVXyTACs3S5+hRH4I34JAelz Vnzg== X-Gm-Message-State: APt69E3SxhkMbp9SZk2k3mqK6dDQDv2rZAcIudSTt811cd0u30CE8Z6Z KkZfyVrDEwnkssnsViD1LeCi8Q== X-Received: by 2002:a1c:b3c3:: with SMTP id c186-v6mr984726wmf.41.1530004955576; Tue, 26 Jun 2018 02:22:35 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id x5-v6sm1438456wrr.3.2018.06.26.02.22.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jun 2018 02:22:35 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, robh+dt@kernel.org, alsa-devel@alsa-project.org Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, lgirdwood@gmail.com, bgoswami@codeaurora.org, tiwai@suse.com, perex@perex.cz, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, niklas.cassel@linaro.org, Srinivas Kandagatla Subject: [PATCH v2 11/12] ASoC: qdsp6: q6routing: add proper error check Date: Tue, 26 Jun 2018 10:20:15 +0100 Message-Id: <20180626092016.9296-12-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> References: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org q6adm_open can return error pointer or a null in error cases. Fix the return handling. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.2 diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index ab696bf8d1d3..c80fdbc2442e 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -310,7 +310,7 @@ int q6routing_stream_open(int fedai_id, int perf_mode, session->channels, topology, perf_mode, session->bits_per_sample, 0, 0); - if (!copp) { + if (IS_ERR_OR_NULL(copp)) { mutex_unlock(&routing_data->lock); return -EINVAL; }