]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
telephony: fix return value
authorNicolas Kaiser <nikai@nikai.net>
Fri, 29 Oct 2010 09:41:42 +0000 (11:41 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 29 Oct 2010 09:41:42 +0000 (11:41 +0200)
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>
drivers/telephony/ixj.c

index 0d236f4bb8c2daf64c8e6b344752f4b71157dbbd..2d1280a7a52b791c0fa8b1048142132575331ef1 100644 (file)
@@ -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;
        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))) 
                break;
        case IXJCTL_SET_FILTER_RAW:
                if (copy_from_user(&jfr, argp, sizeof(jfr)))