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: 10488497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A69A1602D8 for ; Tue, 26 Jun 2018 09:30:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A37EC28856 for ; Tue, 26 Jun 2018 09:30:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9815128868; Tue, 26 Jun 2018 09:30:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E71F28857 for ; Tue, 26 Jun 2018 09:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ap21kwxDKswUEfSG3vQcVxXYrQY0DfOeI3kX+Jbr/Ss=; b=csXHeDdiG8i+AhYSUwYNTh4xad nNn4VX9IeW2dCeUIlZAjG/L8vl9kH2ui9drP5jD4gTPjCAytWPJSjITAm3izbBPh/EdhXQIBl5WtZ NFtcpOFJ+YnnKXrOe+8AMUVdKIR8UNcP0PojeP9ulz6d0seMlIQ0kmEQbyUHYtJLsXp9Q9qefWLTo CAMOe3iN3NFsGKmHADcK0gfg1WRcxFSqoN7h5izJdp5DOOcMmaP1LDu92yjP1AO36JyE6muYgSoTn 3ncka5v90dwFMVao2jS1DUKOAyR50WIhbY5SEeBvbmFAUVAUiT4JRcsRq9s1NSbrPnrmEtAEIPTdI iLjOGwww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkIg-0005wL-A7; Tue, 26 Jun 2018 09:30:14 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkBT-0000XA-8v for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 09:22:55 +0000 Received: by mail-wm0-x22a.google.com with SMTP id l15-v6so14706566wmc.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=hcKM4aSCFJtfFG+zNTEnw0w8ozvTCgWksrh7BeH8L43PVjIezCU4Bngid/QA5opCrX hTXYq6So+8kkAtWvWXIUybcc8nCdHf2nELmSHm3mguUDS4TsWXiAzalyDTxZ+H4PaHRP aC3syZ5JNLmfRxyAcs2e3fSZDxmDp7pLs1QCY129T+VxjjCwNtb1KOaqiRZoMWgF4bg4 5dKW9eTsssm6k/Suwkd/xbte3F0VaknR3aIbMHTdc4UIq1mSzxaqqlgsQBCSMJVW1hCh mPGoT+BZisi8MQ4Ar8PCWxa5yBFgj2Qkl8FUvwoRKJAxR9rOJAkD9+fuCqxHdjcRZTHC 4xPg== X-Gm-Message-State: APt69E3Tk62a2ZABQIByOfZcpXX5eBmFruU8Q6Dl9+sOeYDcuEb7/nGb yMFjYKCIboMM1T5Ws3k9H52kSQ== X-Google-Smtp-Source: AAOMgpfTR1J6W5SXAmymsM/QkUqQ2iA7pd84rmBofWlWZS+mXIeCiX8Npd2xIc3zJmEToJIZyH6pfQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180626_022247_338183_74F8E38D X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, bgoswami@codeaurora.org, lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, tiwai@suse.com, perex@perex.cz, Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, niklas.cassel@linaro.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP q6adm_open can return error pointer or a null in error cases. Fix the return handling. Signed-off-by: Srinivas Kandagatla Acked-by: Niklas Cassel --- 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; }