Skip to contentSkip to conversation

ALSA: sh: Fix wrong argument order for copy_from_iter()

PATCH New Takashi Iwai 1 participant 1 message Dec 20, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: sh: Fix wrong argument order for copy_from_iter()

Fix a brown paper bag bug I introduced at converting to the standard iter helper; the arguments were wrongly passed and have to be swapped.

Fixes 9b5f8ee43e48 ("ALSA: sh: Use standard helper for buffer accesses")
---
 sound/sh/sh_dac_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/sh/sh_dac_audio.c +1 -1
index a4d07438ad64..3f5422145c5e 100644
@@ -163,7 +163,7 @@ static int snd_sh_dac_pcm_copy(struct snd_pcm_substream *substream,
 	/* channel is not used (interleaved data) */
 	struct snd_sh_dac *chip = snd_pcm_substream_chip(substream);
 
-	if (copy_from_iter(chip->data_buffer + pos, src, count) != count)
+	if (copy_from_iter(chip->data_buffer + pos, count, src) != count)
 		return -EFAULT;
 	chip->buffer_end = chip->data_buffer + pos + count;
 
Signature · 1 line
2.43.0