From: Knut Petersen <Knut_Petersen@t-online.de>
To: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH 07/10] ALSA: rme96: Return error code in PCM copy ops
Date: Fri, 15 Nov 2013 10:40:07 +0100 [thread overview]
Message-ID: <5285EBF7.7080109@t-online.de> (raw)
In-Reply-To: <1383062433-9388-8-git-send-email-tiwai@suse.de>
On 29.10.2013 17:00, Takashi Iwai wrote:
> 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 | 10 ++++------
> 1 file 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,
> 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);
Under which circumstances could copy_from_user_toio() fail?
> }
>
> 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);
When will copy_to_user_fromio() fail?
cu,
Knut
> }
>
> /*
next prev parent reply other threads:[~2013-11-15 9:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 16:00 [PATCH 00/10] Yet another small covery bug fixes Takashi Iwai
2013-10-29 16:00 ` [PATCH 01/10] ALSA: opl3: Fix possible negative array index access Takashi Iwai
2013-10-29 16:00 ` [PATCH 02/10] ALSA: pcsp: Fix initialization with nopcm=1 Takashi Iwai
2013-10-29 16:00 ` [PATCH 03/10] ALSA: Limit the fallback card id string size Takashi Iwai
2013-10-29 16:00 ` [PATCH 04/10] ALSA: Use strlcpy() instead of strncpy() Takashi Iwai
2013-10-29 16:00 ` [PATCH 05/10] ALSA: ad1889: Fix right attenuation proc output Takashi Iwai
2013-10-29 16:00 ` [PATCH 06/10] ALSA: ali5451: Drop unused variable Takashi Iwai
2013-10-29 16:00 ` [PATCH 07/10] ALSA: rme96: Return error code in PCM copy ops Takashi Iwai
2013-11-15 9:40 ` Knut Petersen [this message]
2013-11-15 9:53 ` Takashi Iwai
2013-10-29 16:00 ` [PATCH 08/10] ALSA: ak4114: Fix wrong register array size Takashi Iwai
2013-10-29 16:00 ` [PATCH 09/10] ALSA: ice1724: Fix uninitialized variable access Takashi Iwai
2013-10-29 16:00 ` [PATCH 10/10] ALSA: lola: Fix uninitialized variable access in error message Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5285EBF7.7080109@t-online.de \
--to=knut_petersen@t-online.de \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.