Skip to content

Commit

Permalink
ALSA: sh: Fix wrong argument order for copy_from_iter()
Browse files Browse the repository at this point in the history
commit 66a0a2b 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: 9b5f8ee ("ALSA: sh: Use standard helper for buffer accesses")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
tiwai authored and gregkh committed Jan 2, 2025
1 parent f59b81f commit f3e6eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/sh/sh_dac_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f3e6eaf

Please sign in to comment.