Skip to content

Commit 765fee2

Browse files
andres-embtiwai
authored andcommitted
ALSA: echoaudio: remove unused variable
This patch cleans up the code in the __snd_echo_probe function of the echoaudio.c driver by removing the unused variable i and moving the declaration of the loop variable i inside the foor loops where it is used Signed-off-by: Andres Urian Florez <andres.emb.sys@gmail.com> Link: https://patch.msgid.link/20250319020515.22150-1-andres.emb.sys@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 84d6a46 commit 765fee2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sound/pci/echoaudio/echoaudio.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,6 @@ static int __snd_echo_probe(struct pci_dev *pci,
19661966
struct snd_card *card;
19671967
struct echoaudio *chip;
19681968
char *dsp;
1969-
__maybe_unused int i;
19701969
int err;
19711970

19721971
if (dev >= SNDRV_CARDS)
@@ -1976,7 +1975,6 @@ static int __snd_echo_probe(struct pci_dev *pci,
19761975
return -ENOENT;
19771976
}
19781977

1979-
i = 0;
19801978
err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
19811979
sizeof(*chip), &card);
19821980
if (err < 0)
@@ -2080,7 +2078,7 @@ static int __snd_echo_probe(struct pci_dev *pci,
20802078
#ifdef ECHOCARD_HAS_DIGITAL_MODE_SWITCH
20812079
/* Creates a list of available digital modes */
20822080
chip->num_digital_modes = 0;
2083-
for (i = 0; i < 6; i++)
2081+
for (int i = 0; i < 6; i++)
20842082
if (chip->digital_modes & (1 << i))
20852083
chip->digital_mode_list[chip->num_digital_modes++] = i;
20862084

@@ -2092,7 +2090,7 @@ static int __snd_echo_probe(struct pci_dev *pci,
20922090
#ifdef ECHOCARD_HAS_EXTERNAL_CLOCK
20932091
/* Creates a list of available clock sources */
20942092
chip->num_clock_sources = 0;
2095-
for (i = 0; i < 10; i++)
2093+
for (int i = 0; i < 10; i++)
20962094
if (chip->input_clock_types & (1 << i))
20972095
chip->clock_source_list[chip->num_clock_sources++] = i;
20982096

0 commit comments

Comments
 (0)