From patchwork Thu Apr 26 13:00:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 10365951 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 BF051601BE for ; Thu, 26 Apr 2018 13:01:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FB8B291B0 for ; Thu, 26 Apr 2018 13:01:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9886D292D8; Thu, 26 Apr 2018 13:01:56 +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=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 502A4291B0 for ; Thu, 26 Apr 2018 13:01:11 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 96C5C2677F1; Thu, 26 Apr 2018 15:01:08 +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 1DC5B2677F6; Thu, 26 Apr 2018 15:01:07 +0200 (CEST) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by alsa0.perex.cz (Postfix) with ESMTP id 22CD626779A for ; Thu, 26 Apr 2018 15:01:02 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id i194so15885640pgd.0 for ; Thu, 26 Apr 2018 06:01:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qVC2Y/wPP93Qk6Qq+P+ZX++NJl8kRHtdSmzRgvKbfwc=; b=trP0aK9qXGM5OqgifoYr//MkS8qvqvdWeHm8taqoJwof18mZcdZkZHYr0m9MUF16lX aDlIlh8uiKSEeKqp37ysJd+v2WiCw5k5qhhLVYR8hVJclD4w/T4xouu2zJmjCN8H5jpR aiX8Nk5pORvhPVKKTd0rzXS/RmvO87pLtf7tL/wDIDXux6+D81fbRTiALEtQpZYZv56c mjBkQBXIjB+yiEDQ9JuCvF7eFIH6i+toO0OqaAiE0P/lCRMxdHRF3PfGrsQx9sdk/Y6A 4cgVKwqJp9oCUlEkkZksTPvYPgGSqb5QursnlA2qPTnaX14yiZ6pJpkA+a+00lOKfa0N 28nA== X-Gm-Message-State: ALQs6tC2if7MeW7F85h48+BI+DkjMpEHC+xwoKWacCNm5wzSaG8tehkY y+UhEIGmEOfZLlNIhxW1owY= X-Google-Smtp-Source: AIpwx4/361whVm5rFUV+DMjODUx/uHVHBy1h+TwdJXi1KnWXDkLlXF/1SPWbdWPAPLxvtFLFFtyEYg== X-Received: by 10.99.115.82 with SMTP id d18mr28151389pgn.52.1524747660200; Thu, 26 Apr 2018 06:01:00 -0700 (PDT) Received: from localhost.localdomain (i196238.dynamic.ppp.asahi-net.or.jp. [61.125.196.238]) by smtp.gmail.com with ESMTPSA id m10sm32337314pgd.32.2018.04.26.06.00.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 06:00:59 -0700 (PDT) From: Takashi Sakamoto To: clemens@ladisch.de, tiwai@suse.de Date: Thu, 26 Apr 2018 22:00:29 +0900 Message-Id: <20180426130029.4440-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.14.1 Cc: alsa-devel@alsa-project.org, stable@vger.kernel.org Subject: [alsa-devel] [PATCH] ALSA: dice: fix error path to destroy initialized stream data 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 In error path of snd_dice_stream_init_duplex(), stream data for incoming packet can be left to be initialized. This commit fixes it. Fixes: 436b5abe2224 ('ALSA: dice: handle whole available isochronous streams') Cc: # v4.6+ Signed-off-by: Takashi Sakamoto --- sound/firewire/dice/dice-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/firewire/dice/dice-stream.c b/sound/firewire/dice/dice-stream.c index 8573289c381e..928a255bfc35 100644 --- a/sound/firewire/dice/dice-stream.c +++ b/sound/firewire/dice/dice-stream.c @@ -435,7 +435,7 @@ int snd_dice_stream_init_duplex(struct snd_dice *dice) err = init_stream(dice, AMDTP_IN_STREAM, i); if (err < 0) { for (; i >= 0; i--) - destroy_stream(dice, AMDTP_OUT_STREAM, i); + destroy_stream(dice, AMDTP_IN_STREAM, i); goto end; } }