Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3988604ybg; Fri, 25 Oct 2019 11:44:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqweZwwj33I6PsVBkQYf4sVnXCN6dlPO3leLVYh2Risos8L8vZKR7FK8CSjQNszV5EcxyjtQ X-Received: by 2002:a50:cbc2:: with SMTP id l2mr5709380edi.304.1572029061899; Fri, 25 Oct 2019 11:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572029061; cv=none; d=google.com; s=arc-20160816; b=VVEygxXL8y9bazOC669r9ywZWghtyyew1/oSeGnYlyovqzgAFuQY+cjsH3qynXF+vb yJMzqwk+jUKu2in/N/xuBXf1esH07p8Gdp/iGri9c+lEa9wy58acXJaBESxo2h1UZtMq atP0qYlgV41l0eS4CTd+yf09t4p2kkuifMAG/c241p8RlxF4MF8axV2bnxTQ5gbd8w0+ 77J+nAEj17KhV3dFb47qPK0E50WF1xwUU79YwS4VHh3eyazJKIFIMCudTP5DnmvHvlDv gemQNii6Asj5YZht3tD67Y5l+a5tHbPLDB4F5tgoJKblrdm7qNm5b+BkU8JweEMgnugn 2Uvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=crG+DRT5ntTO6UrnZjz7Zk+aIch4CLzmhTF61MiVCPc=; b=OwW21xA1BZsrfQoVALhUyMKve8gye08OoMSQWFEGEHMRUUSecH1WSTOBFIod6SskQK VhLc7LX9wrBFmfzYR+mFUIA7J9l2IC+Wuj9fplygbT2nmCv+NeXhJ5OX52jMFuH9kkcT nxzCTxv9COvaNjQtcar+L+kdI1Ovm7YESrzm16gD45cRFoLxY2Vd/N4FI0xx1yx4v/ZZ jIE1GEez9/w78aV1IaKuUMcLMp4Vom7doTXA078vtXhMROX3GDpTqHMdfhams3jqOQLE 6i6q5oxwzoyT5xyn6Fz7alp1RRxbwSDKAZEtQBU21osfI793U2k/LZiDrnaSgl2fjmjy zGHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=bNp+7fUR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y56si1870768edd.275.2019.10.25.11.43.58; Fri, 25 Oct 2019 11:44:21 -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=@google.com header.s=20161025 header.b=bNp+7fUR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726079AbfJXRQD (ORCPT + 99 others); Thu, 24 Oct 2019 13:16:03 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33085 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405901AbfJXRQC (ORCPT ); Thu, 24 Oct 2019 13:16:02 -0400 Received: by mail-qk1-f196.google.com with SMTP id 71so20258963qkl.0 for ; Thu, 24 Oct 2019 10:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=crG+DRT5ntTO6UrnZjz7Zk+aIch4CLzmhTF61MiVCPc=; b=bNp+7fURF9Ol8vUPwHGKGm6mK9ijx7pSmONTo8SbOqpmSf0D+KM+IwQY2l8cYRl0tc 4Jlf4tFma80yY3usPo8m8fNAx2W3NJVos7I5+Fy3FYeouo5F7elc73VyeznclDfRUKJ6 1GQuz3/rw88FlDhwFBVqYsiDxvtt5Si747jAG4IuuZuyBtTUXxSgpxctMMsWrQHI2KXC L4kMhUMuXKs1qttPbAlVMMH9KKVo9HAGMIHvPYm9S97Q9Oer5iiXEy3Yi0arikGoB0rO +td1l/vUo1NwJh2Ncplo9FWjk5/JcFWW548edS3pxJbv/LR2OyPs0zvvU0VdgI5PWi4G W/JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=crG+DRT5ntTO6UrnZjz7Zk+aIch4CLzmhTF61MiVCPc=; b=N0KWKVhVX+ItI6QjWmi1o5/YdeAkVM2w1tjSFFRn7juaRXyFXmXMzUet3VLTj7Fjg1 BiIyAcxe2e66OEeYMRRmsz3WsYwQgw4DK8ovLeBhEnBExnrskwZyrsns+tnymgWOyajh afcQst2CRTshBYVPsBsUISRaDUhGj6uKK0X6HWWCbYKNGK1Bpu31iWLLuyh2DyKwh8t7 qMYEscLzwobYfXm7M1G4OhcdlCNueh4kvgFxbkC1PEN4T/xYXaZ8Jxb85oLGav9m3cgD 5hkr/JHRxW/b5tkbSlqUPNHe1NyIPi14uHoSqUCKgd9YMhBzgvLVMc5DrMuLmieu7f51 GJnA== X-Gm-Message-State: APjAAAWCuwyfE2NRiI63rO5RvCVkxw/8wMfMXqZge4ma4pvfCmLNFDIy J52WvbzGk+mWWr34Xh0zf9DDzDcaNMWOvHFPmj7VIg== X-Received: by 2002:a37:9a8a:: with SMTP id c132mr14717102qke.92.1571937359669; Thu, 24 Oct 2019 10:15:59 -0700 (PDT) MIME-Version: 1.0 References: <20191024124610.18182-1-colin.king@canonical.com> In-Reply-To: <20191024124610.18182-1-colin.king@canonical.com> From: Curtis Malainey Date: Thu, 24 Oct 2019 10:15:48 -0700 Message-ID: Subject: Re: [PATCH][next] ASoC: rt5677: Add missing null check for failed allocation of rt5677_dsp To: Colin King Cc: Bard Liao , Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Curtis Malainey , Ben Zhang , ALSA development , kernel-janitors@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 24, 2019 at 5:46 AM Colin King wrote: > > From: Colin Ian King > > The allocation of rt5677_dsp can potentially fail and return null, so add > a null check and return -ENOMEM on a memory allocation failure. > > Addresses-Coverity: ("Dereference null return") > Fixes: a0e0d135427c ("ASoC: rt5677: Add a PCM device for streaming hotword via SPI") > Signed-off-by: Colin Ian King Thanks Acked-by Curtis Malainey > --- > sound/soc/codecs/rt5677-spi.c | 2 ++ > 1 file changed, 2 insertions(+)