Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4897740imm; Tue, 26 Jun 2018 02:24:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLdTkTFwUJV8U7WPP/DsIGBIwP5bsZXdjsRmA++BNLfxfv4ebiShT02qWAhI8/Z4jncEZOF X-Received: by 2002:a17:902:700a:: with SMTP id y10-v6mr783589plk.249.1530005060240; Tue, 26 Jun 2018 02:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530005060; cv=none; d=google.com; s=arc-20160816; b=U9G7L4ng38FFD4JopsjIkUxRejv8LBAcLqDBlOQM2CtPMOOZDJqv+NCZy22cA92mRI +CVmTYtdlwG+GHIZyE8QxeQts2hbYfXW+dx9LerIWGufvSGaUrZ79yRhOJg+XQHDocke eEES2pZHKIb5Wvc9OAcg28MNtcVCAEIvpcDGgHg8YEW8xwgCq48cfMKMDiyexB2KWWms 8gg0PYfCDABExb1qc/4foCUAWH3dEo7WNT3KjEeeFEwtdfxMo+1/V2YiGUeZXqZgzZUE BR+cF+xJO6YMHVMbOTDGYcetExHk+wEbAT7obERIHXl+6gDgaStpz9hcV8NopMRMQpAC 3z4g== 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 h66-v6si878391pfa.238.2018.06.26.02.24.05; Tue, 26 Jun 2018 02:24:20 -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 S934046AbeFZJXJ (ORCPT + 99 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(-) 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; } -- 2.16.2