From patchwork Wed Jan 22 09:28:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97F81C33CAF for ; Wed, 22 Jan 2020 09:42:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C49224684 for ; Wed, 22 Jan 2020 09:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579686141; bh=mVsDAopeiFdOOAJlD7vY5WAS4z+/vv+buahmyoiVCKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KhRlFxY3Aq99KMhU98NVD0qW99c5anqYNMYS39mIAU2HmmqcJbB6Ghg0HM92LVw1D gLT+uqODAcXIXyGeLrNt9Je1gAm2/q4dtmwGLE/UMrHog/syP54/SKdWaVuLDLn30M dbzYQkbrtOHPMzG865IbsvpRzih6Uc+EOfMxghxM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387698AbgAVJmT (ORCPT ); Wed, 22 Jan 2020 04:42:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733172AbgAVJmS (ORCPT ); Wed, 22 Jan 2020 04:42:18 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0B37424680; Wed, 22 Jan 2020 09:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579686138; bh=mVsDAopeiFdOOAJlD7vY5WAS4z+/vv+buahmyoiVCKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNadaqNH4womxjxwd4wUEE87CGyi/CNgJtTd9P3fe3saUtCX1lGh8Q/HCwYnmgZq6 5DZMm6oXQ47bsQa02ZplXeRnlKvPquuDe+hGVfO3rkmMijUrS0z7silEbZbApky5Ea 2Af/kQD3gyBUp2lDo823a224Trn16UcR6PCQDAnI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai Subject: [PATCH 4.19 023/103] ALSA: dice: fix fallback from protocol extension into limited functionality Date: Wed, 22 Jan 2020 10:28:39 +0100 Message-Id: <20200122092807.241889346@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092803.587683021@linuxfoundation.org> References: <20200122092803.587683021@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Takashi Sakamoto commit 3e2dc6bdb56893bc28257e482e1dbe5d39f313df upstream. At failure of attempt to detect protocol extension, ALSA dice driver should be fallback to limited functionality. However it's not. This commit fixes it. Cc: # v4.18+ Fixes: 58579c056c1c9 ("ALSA: dice: use extended protocol to detect available stream formats") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/firewire/dice/dice-extension.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/sound/firewire/dice/dice-extension.c +++ b/sound/firewire/dice/dice-extension.c @@ -159,8 +159,11 @@ int snd_dice_detect_extension_formats(st int j; for (j = i + 1; j < 9; ++j) { - if (pointers[i * 2] == pointers[j * 2]) + if (pointers[i * 2] == pointers[j * 2]) { + // Fallback to limited functionality. + err = -ENXIO; goto end; + } } }