* [patch] Staging: solo6x10: return -EFAULT on copy_to_user errors
@ 2010-08-10 6:09 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-08-10 6:09 UTC (permalink / raw)
To: kernel-janitors
copy_to_user() returns the number of bytes remaining to be copied, but
we want to return a negative error code here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/solo6x10/solo6010-g723.c b/drivers/staging/solo6x10/solo6010-g723.c
index e82846c..82fbcb8 100644
--- a/drivers/staging/solo6x10/solo6010-g723.c
+++ b/drivers/staging/solo6x10/solo6010-g723.c
@@ -233,7 +233,7 @@ static int snd_solo_pcm_copy(struct snd_pcm_substream *ss, int channel,
solo_pcm->g723_buf, G723_PERIOD_BYTES);
if (err)
- return err;
+ return -EFAULT;
}
return 0;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-10 6:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-10 6:09 [patch] Staging: solo6x10: return -EFAULT on copy_to_user errors Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).