From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754745AbdKGDxe (ORCPT ); Mon, 6 Nov 2017 22:53:34 -0500 Received: from mga04.intel.com ([192.55.52.120]:47666 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790AbdKGDxc (ORCPT ); Mon, 6 Nov 2017 22:53:32 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,356,1505804400"; d="scan'208";a="1240630398" Date: Tue, 7 Nov 2017 09:26:42 +0530 From: Vinod Koul To: Arnd Bergmann Cc: Mark Brown , Guneshwor Singh , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Naveen Manohar , "Subhransu S. Prusty" , Harsha Priya N , Pierre-Louis Bossart , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: intel: initialize return value properly Message-ID: <20171107035641.GR3187@localhost> References: <20171106133114.339667-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171106133114.339667-1-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 06, 2017 at 02:30:36PM +0100, Arnd Bergmann wrote: > When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an > uninitialized variable: > > sound/soc/intel/skylake/skl.c: In function 'skl_resume': > sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > I have run into this on today's linux-next kernel, but it appears > that this is an older problem that was just hard to trigger > with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in > effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE > enabled. do we need this in changelog :) Anyway this sound fine to me, so: Acked-By: Vinod Koul > Signed-off-by: Arnd Bergmann > --- > sound/soc/intel/skylake/skl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c > index 31d8634e8aa1..acb0ab470ca6 100644 > --- a/sound/soc/intel/skylake/skl.c > +++ b/sound/soc/intel/skylake/skl.c > @@ -355,6 +355,7 @@ static int skl_resume(struct device *dev) > > if (ebus->cmd_dma_state) > snd_hdac_bus_init_cmd_io(&ebus->bus); > + ret = 0; > } else { > ret = _skl_resume(ebus); > > -- > 2.9.0 > -- ~Vinod