aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-10-29 11:04:37 -0400
committerTakashi Iwai <tiwai@suse.de>2013-10-29 11:04:37 -0400
commit2026d24ef2ea8caad5e87662a58075e930ccab63 (patch)
treecd10db38b6e02dd7afb7c7eb0da8c11d65ecdcb6 /sound/pci
parent329bbd9ba738b85675151b82260cd08bdd765de2 (diff)
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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/rme96.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index bb9ebc5543d7..0236363c301f 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -350,9 +350,8 @@ snd_rme96_playback_copy(struct snd_pcm_substream *substream,
350 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 350 struct rme96 *rme96 = snd_pcm_substream_chip(substream);
351 count <<= rme96->playback_frlog; 351 count <<= rme96->playback_frlog;
352 pos <<= rme96->playback_frlog; 352 pos <<= rme96->playback_frlog;
353 copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src, 353 return copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src,
354 count); 354 count);
355 return 0;
356} 355}
357 356
358static int 357static int
@@ -365,9 +364,8 @@ snd_rme96_capture_copy(struct snd_pcm_substream *substream,
365 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 364 struct rme96 *rme96 = snd_pcm_substream_chip(substream);
366 count <<= rme96->capture_frlog; 365 count <<= rme96->capture_frlog;
367 pos <<= rme96->capture_frlog; 366 pos <<= rme96->capture_frlog;
368 copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos, 367 return copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos,
369 count); 368 count);
370 return 0;
371} 369}
372 370
373/* 371/*