From patchwork Wed Oct 18 17:59:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ughreja, Rakesh A" X-Patchwork-Id: 10014283 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 F0F3660211 for ; Wed, 18 Oct 2017 10:11:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E60FE28B16 for ; Wed, 18 Oct 2017 10:11:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D86A328B1C; Wed, 18 Oct 2017 10:11:59 +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=0.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, 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 531D828B16 for ; Wed, 18 Oct 2017 10:11:59 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A45512673D0; Wed, 18 Oct 2017 12:11:57 +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 3BC3A2673D4; Wed, 18 Oct 2017 12:11:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id 21E26266EEB for ; Wed, 18 Oct 2017 12:11:52 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2017 03:11:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,396,1503385200"; d="scan'208"; a="1207102798" Received: from raughrej-desk.iind.intel.com ([10.223.84.131]) by fmsmga001.fm.intel.com with ESMTP; 18 Oct 2017 03:11:48 -0700 From: "Ughreja, Rakesh A" To: alsa-devel@alsa-project.org Date: Wed, 18 Oct 2017 23:29:36 +0530 Message-Id: <1508349576-29947-1-git-send-email-rakesh.a.ughreja@intel.com> X-Mailer: git-send-email 2.7.4 Cc: tiwai@suse.de, vinod.koul@intel.com, Rakesh Ughreja Subject: [alsa-devel] [PATCH] ALSA: hda: Abort capability probe on invalid capability 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 From: Rakesh Ughreja When an invalid capability is discovered, stop traversing the capability link list further. Signed-off-by: Rakesh Ughreja --- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index 978dc18..4fa0cc0 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -314,7 +314,8 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) break; default: - dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap); + cur_cap = 0; + dev_err(bus->dev, "Unknown capability %d\n", cur_cap); break; }