From patchwork Wed Aug 23 14:07:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Subhransu S. Prusty" X-Patchwork-Id: 9917471 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 5050C603FA for ; Wed, 23 Aug 2017 14:24:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E52B828565 for ; Wed, 23 Aug 2017 14:24:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9544288D4; Wed, 23 Aug 2017 14:24:29 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5615B288A3 for ; Wed, 23 Aug 2017 14:24:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E89B02677A2; Wed, 23 Aug 2017 16:24:27 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 125ED26779B; Wed, 23 Aug 2017 16:24:26 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by alsa0.perex.cz (Postfix) with ESMTP id 3324C2677A2 for ; Wed, 23 Aug 2017 16:24:20 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 23 Aug 2017 07:24:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,417,1498546800"; d="scan'208";a="141161611" Received: from subhransu-desktop.iind.intel.com ([10.223.96.135]) by orsmga005.jf.intel.com with ESMTP; 23 Aug 2017 07:24:17 -0700 From: "Subhransu S. Prusty" To: alsa-devel@alsa-project.org Date: Wed, 23 Aug 2017 19:37:12 +0530 Message-Id: <1503497232-21345-1-git-send-email-subhransu.s.prusty@intel.com> X-Mailer: git-send-email 1.9.1 Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org, "Subhransu S. Prusty" , lgirdwood@gmail.com Subject: [alsa-devel] [PATCH] ASoC: Intel: Skylake: Fix uninitialized return X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On failure to get dsp_ops, dsp_init returns error without assigning ret. ret is assigned in code path which will never be executed. Fix it. Fixes: f77d443c4c29 ("ASoC: Intel: Skylake: Fix to free resources for dsp_init failure" Reported-by: kbuild test robot Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul --- sound/soc/intel/skylake/skl-messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index f0f11f597b21..697d07bc1b5a 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -278,8 +278,8 @@ int skl_init_dsp(struct skl *skl) ops = skl_get_dsp_ops(skl->pci->device); if (!ops) { - goto unmap_mmio; ret = -EIO; + goto unmap_mmio; } loader_ops = ops->loader_ops();