Skip to content

Commit

Permalink
Staging: solo6x10: return -EFAULT on copy_to_user errors
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent c7e62de commit 6a4ca03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/solo6x10/solo6010-g723.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6a4ca03

Please sign in to comment.