From patchwork Mon Jun 25 14:31: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: 139856 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4065642lji; Mon, 25 Jun 2018 07:34:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIsQlX78CCjFdtnvg3TEblP1D3HyRU/OebZ6kdNZBPO2uZGkoleHL5GoiAPULfDJcoZLDEL X-Received: by 2002:a65:4809:: with SMTP id h9-v6mr11054110pgs.258.1529937242861; Mon, 25 Jun 2018 07:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529937242; cv=none; d=google.com; s=arc-20160816; b=JoGEvRE1U2zfD0Sfeld8b/lB91FinUbU/Mvcgi1vxBWOe5gjW9fq+KEYsOMExxG40S 3MEl2OWKxtQeiKSSeQe2MEqF/9dqACww0v7G11nEfOjlDCnE7DapehgH0JK4u6xTRvOl uxCSrXAjD0tUDrGgVozuMq14M5jHpqD9E+HzkFumqphpucBFIn0Lmu39gTsud5sIjxgY MbpaqIfUD+iBkB/esawB4ZrWGupuLWq6/k6y3ydKXwJxIBmwuRd52yDdZ4iDAul+vQBS 01c0f8wvmLnclybbFRwb76qC1nc99pNzCls5ziR6YsldJnbmMyOj2V6djskrtwRrPl7D fn2A== 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=b0gdBHrLe8kgfvPWBQEIDgkQwYVJAhof7uf2A7BuNFU=; b=fJi3q/pXUpB6NfIGVY2i9nIIjg7vwh1MOy8niQwudhw7E4z8YGdHcyZ1buyPG8s5HC AU+eNpwDKFyJae+MRrdZyF6DG5exCMOofgaQbc8+h9g3esYoBr62kq9Nj3sOZa0boI0f HZQjmcnTsMBAoatPTPs/pWPOD0DXeyAmoP/7rlapQkITENlkLeySo604fnbT8clmTaF3 nkVu3hiif7t3YBvN/l8jWHB/HDOFkug7VT0955MLTM/6dbBMyE0PpLDQpbssSQ8zX6Ky lDyQF1QN/mRsPa2TI6+f9yYnAJszgtCnFXG8M+V2LBrCVFOT9FmRJO2biHdKEzA3xsyH A3Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=V7TRGhWR; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (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 e12-v6si12023098pgn.171.2018.06.25.07.34.02; Mon, 25 Jun 2018 07:34:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=V7TRGhWR; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934397AbeFYOeB (ORCPT + 13 others); Mon, 25 Jun 2018 10:34:01 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35653 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934410AbeFYOeA (ORCPT ); Mon, 25 Jun 2018 10:34:00 -0400 Received: by mail-wm0-f42.google.com with SMTP id z137-v6so4572716wmc.0 for ; Mon, 25 Jun 2018 07:33:59 -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=KWB6NY8t/omvKgNIyRy4P+yYxeMR+uXpqk4adQInmwE=; b=V7TRGhWRzGp/1OxGK8hqABT03Zv9oV2yZclH8iokFjTCT8cUqtaCDPuWT4hzicPMrE 2FEuWdHFc9IpBE17Br3cobZJjppGLJ2s0NuoYK6sdRddph+Eg/3UzgXO5L0yVRsosSgo 0HSyRzHJpppgp1qL0U5ZXIoS2zp9UZpURzGw4= 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=KWB6NY8t/omvKgNIyRy4P+yYxeMR+uXpqk4adQInmwE=; b=uJujrEE7rXTi58EOTIJeS5jhiIf0qE+NsSP/wtBCKBkwaxUy6CFIkpjPJUUo5c6r7M 0JpAck12PN4O2UZ0zGDCQn7+rs4T3gVxqEfJRneyQ2J8pDXR/Viihd8eVZWnCYiJjFQA MxNHPHLWXIXT4LkjS1fpOCbCxIZieUeHCiU8VUyUfHb9Ba1pqTKbflkTPQw5ZqKCJr9l h9nuBlWSTh13+63FUtnF1na2M2TOZgXAwLLvskDB+SkHcRD4b3s+w9i03RcoPgKlfR8l j3aJgCYmy2WC1+Qv5JjlEuj/fGuM2sVuG2aSSt2T969ubNLErNR6xM1wsUhqhIKlA53k 8pXg== X-Gm-Message-State: APt69E2xj4KoGNx1uomgfB/St650hyROS+gjlq8EX6gl/2Nm5j5oi5lD r4979SDojHzaEANraWPVLEL96A== X-Received: by 2002:a1c:2c03:: with SMTP id s3-v6mr1227895wms.109.1529937238873; Mon, 25 Jun 2018 07:33:58 -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 s12-v6sm1321193wrr.43.2018.06.25.07.33.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jun 2018 07:33:58 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, robh+dt@kernel.org, bgoswami@codeaurora.org Cc: lgirdwood@gmail.com, plai@codeaurora.org, tiwai@suse.com, perex@perex.cz, devicetree@vger.kernel.org, rohkumar@qti.qualcomm.com, linux-arm-kernel@lists.infradead.org, srinivas.kandagatla@linaro.org, niklas.cassel@linaro.org Subject: [PATCH 11/11] ASoC: qdsp6: q6routing: add proper error check Date: Mon, 25 Jun 2018 15:31:15 +0100 Message-Id: <20180625143115.8346-12-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180625143115.8346-1-srinivas.kandagatla@linaro.org> References: <20180625143115.8346-1-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org q6adm_open can return error pointer or a null in error cases. Fix this check this. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index caf2f847a886..c18f808c7730 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; }