diff options
author | Nicolas Kaiser <nikai@nikai.net> | 2010-10-29 05:41:42 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-10-29 05:41:42 -0400 |
commit | b0438a1b71955c425c304a2a483765ef24841766 (patch) | |
tree | f9ca0831d87ca8b83280711a3cbaacee73e87ec2 | |
parent | 229aebb873e29726b91e076161649cf45154b0bf (diff) |
telephony: fix return value
If copy_from_user fails, the return value gets overwritten.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/telephony/ixj.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index 0d236f4bb8c2..2d1280a7a52b 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c | |||
@@ -6581,7 +6581,8 @@ static long do_ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long ar | |||
6581 | case IXJCTL_SET_FILTER: | 6581 | case IXJCTL_SET_FILTER: |
6582 | if (copy_from_user(&jf, argp, sizeof(jf))) | 6582 | if (copy_from_user(&jf, argp, sizeof(jf))) |
6583 | retval = -EFAULT; | 6583 | retval = -EFAULT; |
6584 | retval = ixj_init_filter(j, &jf); | 6584 | else |
6585 | retval = ixj_init_filter(j, &jf); | ||
6585 | break; | 6586 | break; |
6586 | case IXJCTL_SET_FILTER_RAW: | 6587 | case IXJCTL_SET_FILTER_RAW: |
6587 | if (copy_from_user(&jfr, argp, sizeof(jfr))) | 6588 | if (copy_from_user(&jfr, argp, sizeof(jfr))) |