Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3695887ybv; Mon, 10 Feb 2020 04:53:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyirQKdASbnpVH6WU8G5M+ImzaZ83b4jGtk6ap904UdOrUxZCjAmySYzqFBEef+DABc/eih X-Received: by 2002:aca:ea43:: with SMTP id i64mr750012oih.30.1581339195115; Mon, 10 Feb 2020 04:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339195; cv=none; d=google.com; s=arc-20160816; b=hlF5QC6cKg1/6zYiSzLNlpaSCcAIgbC+CYZ7U5/YnPoYeXNtBm890q6yV6HbyHVlWO rTTkz+TYXMo8M/1x6bFY49GDk0bwT5LQWZQLVOudRIKbpc7OfPzeNTWkFMYbxaMi5LQm z6F6PqwqPRJwJWVl1ubgtZHM84gf1eMotyYso8DJ3zAAws5nG54H7IGrLTeqS1B8CyXB ut2SH6XNPkXXXbdjU7BQ0bNgOSfWQ5U4WwE6917FjLP0dDLMWcF0J3vzpIIaiUXpyvoB hb6mMYkK81tpOEiWI8vGqK5WAkP4s0eNqjrE8u63G1iLNJ93SRFWiL3plGQwUdFl7WXA QhiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mpcQ8ci1KcC0afAX/KcoWdeZqlS6XJwel7drZvPBuUY=; b=RmQrDA5azKmEVFbwsD+EwjVqNyqU01qDGMZ/xcBJ3pArkI9wHISQKMYi1WTwce2+3m PEU1VACFm9VaKSgmx2OR5DbQvIE0+FH67hP4KnfKLsv97bI7PHNLeiThgU5BKhUHMZ73 /VohxIgx4eaZZmaDJPH4O5On0ngmKxbhZvtOh5JoMEbY3LPUwO3E30UghPPNczpzq6+m tqsV13P6XVQpCOzY7Vnvnbfjf4HTRMRSiTE2HA9WiidmU0l05iwnxRI7x7MVuboR3E82 2YUrAqYlt1WFhNt2kI4om1Y+m8Y/4MpKJu+v56RDcol6BEmItM8/Boar1EDZu/GxrBxW QYSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K+GPFqkn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si138715otk.234.2020.02.10.04.53.03; Mon, 10 Feb 2020 04:53:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K+GPFqkn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729208AbgBJMmz (ORCPT + 99 others); Mon, 10 Feb 2020 07:42:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:37728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729463AbgBJMjh (ORCPT ); Mon, 10 Feb 2020 07:39:37 -0500 Received: from localhost (unknown [209.37.97.194]) (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 18F7620842; Mon, 10 Feb 2020 12:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338377; bh=Yy6UWJQu8MySBSM/VdGtaMO5OFD9fUR1Tqy1Y26egAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K+GPFqkndHm/WOGOCDNUjOIsRNsDANpk7cEyl4OZnmg6UeNJOfUFBpAVuSAfB8/5W H4C99F4kbBx/CGbDsjvFQ4SQNNPPlHrZ8H/SHMZpQZt1Xdac4YgdrLp/KdR2EGg0O+ FjQYCz7mT4je1H/TwhTc8xJ/vrtNqbNusugitXUg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.5 053/367] ALSA: dummy: Fix PCM format loop in proc output Date: Mon, 10 Feb 2020 04:29:26 -0800 Message-Id: <20200210122428.946899287@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 2acf25f13ebe8beb40e97a1bbe76f36277c64f1e upstream. The loop termination for iterating over all formats should contain SNDRV_PCM_FORMAT_LAST, not less than it. Fixes: 9b151fec139d ("ALSA: dummy - Add debug proc file") Cc: Link: https://lore.kernel.org/r/20200201080530.22390-3-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/drivers/dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -915,7 +915,7 @@ static void print_formats(struct snd_dum { int i; - for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) { + for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) { if (dummy->pcm_hw.formats & (1ULL << i)) snd_iprintf(buffer, " %s", snd_pcm_format_name(i)); }