media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors
[pandora-kernel.git] / drivers / media / video / v4l2-compat-ioctl32.c
index 27134bf..6d6cb56 100644 (file)
@@ -885,6 +885,9 @@ static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long ar
                set_fs(old_fs);
        }
 
+       if (err == -ENOTTY)
+               return err;
+
        /* Special case: even after an error we need to put the
           results back for these ioctls since the error_idx will
           contain information on which control failed. */