From b0438a1b71955c425c304a2a483765ef24841766 Mon Sep 17 00:00:00 2001 From: Nicolas Kaiser Date: Fri, 29 Oct 2010 11:41:42 +0200 Subject: telephony: fix return value If copy_from_user fails, the return value gets overwritten. Signed-off-by: Nicolas Kaiser Signed-off-by: Jiri Kosina --- drivers/telephony/ixj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/telephony') diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index 0d236f4bb8c..2d1280a7a52 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 case IXJCTL_SET_FILTER: if (copy_from_user(&jf, argp, sizeof(jf))) retval = -EFAULT; - retval = ixj_init_filter(j, &jf); + else + retval = ixj_init_filter(j, &jf); break; case IXJCTL_SET_FILTER_RAW: if (copy_from_user(&jfr, argp, sizeof(jfr))) -- cgit v1.2.3-70-g09d2