]> Pileus Git - ~andy/linux/blobdiff - drivers/char/vt_ioctl.c
Merge branch 'topic/ice1724-quartet' into topic/hda
[~andy/linux] / drivers / char / vt_ioctl.c
index 29c651ab0d7891f1504cf5a222a11a6f269c261b..6b36ee56e6fe972db14dd1f4785e5cf173468acf 100644 (file)
@@ -981,8 +981,10 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                        goto eperm;
 
                if (copy_from_user(&vsa, (struct vt_setactivate __user *)arg,
-                                               sizeof(struct vt_setactivate)))
-                       return -EFAULT;
+                                       sizeof(struct vt_setactivate))) {
+                       ret = -EFAULT;
+                       goto out;
+               }
                if (vsa.console == 0 || vsa.console > MAX_NR_CONSOLES)
                        ret = -ENXIO;
                else {