Received: by 10.213.65.68 with SMTP id h4csp245254imn; Fri, 23 Mar 2018 03:49:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELtN3I61y6k4AnPJsNPlw+eS6XUrqKu/RQkscdh4hpBsYxyT/12w0yVut6WycJ3X35wv0Y7Y X-Received: by 2002:a17:902:68c2:: with SMTP id x2-v6mr19794380plm.129.1521802148162; Fri, 23 Mar 2018 03:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521802148; cv=none; d=google.com; s=arc-20160816; b=cEyYHtAmZpdwcS9fGHsTJj5gGSl0Y6Ese1Be5x9FZ1RIv98NXLWv+iJJSI3vXSq3JA m8ulHo2zuEL86xLPTwB4vJOkDj5P9MM1Qi25y8fT88Ex+gpAybGQ54Wxn6AvHZ8Zwnce uRwgDOemrUSYrJelI7W7QtEUFE8D9354K7efMD1GuhNd13fgP6CZCsPMMqZek4zSyZOD JTVA0qCk9zOX15rVmHYYofsmRyQziUf5QFs5/UOtSUg+cjYGPVTT3iByl6Zuodoksk4u 6Qdtkfm72ojqaGyRxqiSu330eolH/bf6h6WhuUgR0rYFCKeljn1uul5TRaVwJJo261/q 112Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3RLUEauIHDpAGPQKi45p2MDjg8XPPgQuJ/PkXbzLxyA=; b=Lriiy+iGhn5iiTDZH308M8M2NyW92oEsHEKCfqegpTiDL/hRo4G8dAgCvvmubUhe98 FiwEkyynUq6WcABxxnxfVC/hzVzPf0W8/nfSzpJssShT22taiSt3hMvfXoDxH9xtfZ13 4sSBhOMeGXx8KtaNdICvDF7pYEkWn5KZfezpJzZwGXYP8UjDe06lz+yfyz/6X5NO+rgt YkMa82dN2EQzIGBYxppdoUxW++z16hIZ9VBBvGLs6y/bBk4feNchM4I0WIG6qkHw5aIR EXiC/kpeGCgB8n7xI3VNOv0F+ae2pPajMPvbw0XvvudaVL0Z8tk+JffFUCKAbgHNBKI8 Aaaw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k63si6680342pfh.372.2018.03.23.03.48.53; Fri, 23 Mar 2018 03:49:08 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756067AbeCWKr7 (ORCPT + 99 others); Fri, 23 Mar 2018 06:47:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45498 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933402AbeCWKPG (ORCPT ); Fri, 23 Mar 2018 06:15:06 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F2ADC1274; Fri, 23 Mar 2018 10:15:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Mark Brown , Sasha Levin Subject: [PATCH 4.4 36/97] ASoC: Intel: Skylake: Uninitialized variable in probe_codec() Date: Fri, 23 Mar 2018 10:54:23 +0100 Message-Id: <20180323094159.693320370@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter [ Upstream commit e6a33532affd14c12688c0e9b2e773e8b2550f3b ] My static checker complains that if snd_hdac_bus_get_response() returns -EIO then "res" is uninitialized. Fix this by initializing it to -1 so that the error is handled correctly. Fixes: d8c2dab8381d ("ASoC: Intel: Add Skylake HDA audio driver") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- sound/soc/intel/skylake/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -280,7 +280,7 @@ static int probe_codec(struct hdac_ext_b struct hdac_bus *bus = ebus_to_hbus(ebus); unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; - unsigned int res; + unsigned int res = -1; mutex_lock(&bus->cmd_mutex); snd_hdac_bus_send_cmd(bus, cmd);