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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Takashi Iwai <tiwai@xxxxxxx>

commit 66a0a2b0473c39ae85c44628d14e4366fdc0aa0d upstream.

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")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202412140019.jat5Dofr-lkp@xxxxxxxxx/
Link: https://patch.msgid.link/20241220114417.5898-1-tiwai@xxxxxxx
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/sh/sh_dac_audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/sh/sh_dac_audio.c
+++ b/sound/sh/sh_dac_audio.c
@@ -163,7 +163,7 @@ static int snd_sh_dac_pcm_copy(struct sn
 	/* 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;
 


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-6.12/alsa-ump-update-legacy-substream-names-upon-fb-info-.patch
queue-6.12/alsa-ump-don-t-open-legacy-substream-for-an-inactive.patch
queue-6.12/alsa-hda-conexant-fix-z60mr100-startup-pop-issue.patch
queue-6.12/alsa-sh-use-standard-helper-for-buffer-accesses.patch
queue-6.12/alsa-ump-indicate-the-inactive-group-in-legacy-subst.patch
queue-6.12/alsa-ump-shut-up-truncated-string-warning.patch
queue-6.12/alsa-sh-fix-wrong-argument-order-for-copy_from_iter.patch
queue-6.12/alsa-memalloc-prefer-dma_mapping_error-over-explicit-address-checking.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux