ALSA: rme96: Return error code in PCM copy ops
authorTakashi Iwai <tiwai@suse.de>
Tue, 29 Oct 2013 15:04:37 +0000 (16:04 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 29 Oct 2013 15:04:37 +0000 (16:04 +0100)
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>
sound/pci/rme96.c

index bb9ebc5543d7a61ff639bbf91d37957d5fdf9086..0236363c301f8e12b7f15a218af5fbcdfb06b25c 100644 (file)
@@ -350,9 +350,8 @@ snd_rme96_playback_copy(struct snd_pcm_substream *substream,
        struct rme96 *rme96 = snd_pcm_substream_chip(substream);
        count <<= rme96->playback_frlog;
        pos <<= rme96->playback_frlog;
-       copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src,
-                           count);
-       return 0;
+       return copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src,
+                                  count);
 }
 
 static int
@@ -365,9 +364,8 @@ snd_rme96_capture_copy(struct snd_pcm_substream *substream,
        struct rme96 *rme96 = snd_pcm_substream_chip(substream);
        count <<= rme96->capture_frlog;
        pos <<= rme96->capture_frlog;
-       copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos,
-                           count);
-        return 0;
+       return copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos,
+                                  count);
 }
 
 /*