Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4908290imm; Tue, 26 Jun 2018 02:37:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJJTzIFm3KmJKe3/mRq/al9WhsuQig+s+xqsYk1szJpOXdg0E+693TJ4nAEeabmyf+nBd+y X-Received: by 2002:a63:2d45:: with SMTP id t66-v6mr660642pgt.381.1530005851690; Tue, 26 Jun 2018 02:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530005851; cv=none; d=google.com; s=arc-20160816; b=mBwK+Mb4jAhcQcxhccj3Cp3rMDbEV0O69NHT6vC7erw1swcjKoUd2gneNlO+vW4r2j qBPYokPHCMV77sRbim28Tpbd7rlN35LLTpxhyBG76P3ZzoldZXF968HP+eN7p6XECB8/ +KWOEMKj9nePbICswp8YJ5SfZVEgrE7VHNu4g+d79AuxP53sPD9xq5N98nJjbDr6cyi+ U1+5lhsltrgNARSjRSVzShZ7eoxa21hilv7YUZG2tRF4UGgdZGHjtyrtka500rg1w/s8 5vudlJ1tP5VmQ1KaULaR2h7j8GKlUNem8m3dmz4/43XuhS99NKuUBbGk0hx4HIPyayuQ Bt9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=KPTmWE0TZni5SmHj1/CdFBVEFFCe1mDBs0oOrKeaOUw=; b=dVAakv3J6/Iydm9TGzV7tu2gc+2tJnvt9ozhwfEGJ3v5IL/aQ8t8dRWQ9zftxJQINb 3PPED5wlinCWUa7G+CK2ahpxQC+CDW91spQyA+lmGKZn29F/8d/ceJDXH/z+GgDNEWD+ cc+OgklLiUCBxlGX6nL3Lx44VrQMOXVALP7LM2g9KL4Abr+izqO0e4Fb68wb3RCDczeM xiePdu8N1s1YJlDv0qC5djemtHiEDwn95Z1zlaJd6JhoAQls1RDFPV1Fw0GuBfWJxPNO QeVeYiBPpZ1+fDindpK0fRQK5e2+u98LimTJRPZixuWcT2Zua+UVRoco9B+bS7K7AXcp s+OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EOYWQ6j6; 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 k9-v6si1248087pfc.129.2018.06.26.02.37.17; Tue, 26 Jun 2018 02:37:31 -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=EOYWQ6j6; 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 S934129AbeFZJgO (ORCPT + 99 others); Tue, 26 Jun 2018 05:36:14 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:39561 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933481AbeFZJgM (ORCPT ); Tue, 26 Jun 2018 05:36:12 -0400 Received: by mail-lf0-f66.google.com with SMTP id q6-v6so1962792lfh.6 for ; Tue, 26 Jun 2018 02:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KPTmWE0TZni5SmHj1/CdFBVEFFCe1mDBs0oOrKeaOUw=; b=EOYWQ6j6KOYSzKMSt6E2oCJz6cg5vHcs6rkoZAjJg15/boLWditLMSsVVC8rp0dOrd 6aosrdDc+i+bsw8cnNu9O9kwwoMAG6W80BDxWkJBq/+hj/bekiJoZFfPavaqr9Ow6HWb gmXB+08XjzuvjIXJ/OUr2AcTFx9m0xN2WJtb4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KPTmWE0TZni5SmHj1/CdFBVEFFCe1mDBs0oOrKeaOUw=; b=N8C0CkJOiGD/rVs4wy/g7cdkMYbHut9IOwgJ1gUmqT+y3RJVPkVNrb9GEwnQqW1Q5u rbh1fw4pMqtEDOrfwV9Swz+Bf9n6p+yASlLCm4CNT60liJiljHmFLzfu3D4SXOsGNlGt +TkFdmRUWr7TKuYT5sC5QsIaQAkLOTDto3bkvFQCTlShr6gR9Z58jCC5Q5Iav/uuYUjc gXP+bP2S93gotRYccykRHaP9vlkbZgxtpozMftE08zHfBmfKKT037MarG3a83zMU1+I2 pgmXvq4xeIzVBKfveimjR73/gd9xYaGRcfT71D8qYmi06MBx8BvaBIH7kSi6SaCdvJaB umbA== X-Gm-Message-State: APt69E3i1ZKrr7DMCjWRK0U6C5O/KmyxC02Qg/D6pbGxA2k/IaS5arN0 ORSuFg1mOR2VW3ZgfxMd2x/2mg== X-Received: by 2002:a19:1586:: with SMTP id 6-v6mr721774lfv.51.1530005771083; Tue, 26 Jun 2018 02:36:11 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id p16-v6sm175802lji.20.2018.06.26.02.36.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 02:36:10 -0700 (PDT) Date: Tue, 26 Jun 2018 11:36:08 +0200 From: Niklas Cassel To: Srinivas Kandagatla Cc: broonie@kernel.org, robh+dt@kernel.org, alsa-devel@alsa-project.org, 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 Subject: Re: [PATCH v2 11/12] ASoC: qdsp6: q6routing: add proper error check Message-ID: <20180626093608.GG25217@centauri.ideon.se> References: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> <20180626092016.9296-12-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626092016.9296-12-srinivas.kandagatla@linaro.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Niklas Cassel On Tue, Jun 26, 2018 at 10:20:15AM +0100, Srinivas Kandagatla wrote: > 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 >