Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: rme96: Return error code in PCM copy ops

Just pass the error code returned from copy_from_user_toio() and
copy_to_user_fromio() helpers.

Spotted by coverity CID 114119.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+4 -6
+4 -6
sound/pci/rme96.c
··· 350 350 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 351 351 count <<= rme96->playback_frlog; 352 352 pos <<= rme96->playback_frlog; 353 - copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src, 354 - count); 355 - return 0; 353 + return copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src, 354 + count); 356 355 } 357 356 358 357 static int ··· 364 365 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 365 366 count <<= rme96->capture_frlog; 366 367 pos <<= rme96->capture_frlog; 367 - copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos, 368 - count); 369 - return 0; 368 + return copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos, 369 + count); 370 370 } 371 371 372 372 /*