From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <error27@gmail.com>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v2] ALSA: pci: lx6464es: fix a debug loop
Date: Wed, 01 Feb 2023 13:23:10 +0100 [thread overview]
Message-ID: <878rhhy3pt.wl-tiwai@suse.de> (raw)
In-Reply-To: <Y9jnJTis/mRFJAQp@kili>
On Tue, 31 Jan 2023 11:02:13 +0100,
Dan Carpenter wrote:
>
> This loop accidentally reuses the "i" iterator for both the inside and
> the outside loop. The value of MAX_STREAM_BUFFER is 5. I believe that
> chip->rmh.stat_len is in the 2-12 range. If the value of .stat_len is
> 4 or more then it will loop exactly one time, but if it's less then it
> is a forever loop.
>
> It looks like it was supposed to combined into one loop where
> conditions are checked.
>
> Fixes: 8e6320064c33 ("ALSA: lx_core: Remove useless #if 0 .. #endif")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> v2: In the first version I just deleted the outside loop but that was
> not the correct fix. Combine the conditions instead.
Thanks, applied.
Takashi
prev parent reply other threads:[~2023-02-01 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 10:02 [PATCH v2] ALSA: pci: lx6464es: fix a debug loop Dan Carpenter
2023-02-01 12:23 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rhhy3pt.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox