From: Dan Carpenter Date: Tue, 10 Aug 2010 06:09:05 +0000 (+0200) Subject: Staging: solo6x10: return -EFAULT on copy_to_user errors X-Git-Tag: MMI-PSA29.97-13-9~21907^2~3^2~759 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a4ca0399255260bb04fa4e718625ede0c745e59;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: solo6x10: return -EFAULT on copy_to_user errors 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/solo6x10/solo6010-g723.c b/drivers/staging/solo6x10/solo6010-g723.c index e82846c1d6c6..82fbcb845878 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;