Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / char / vt_ioctl.c
index 6aa1028..cb19dbc 100644 (file)
@@ -1303,7 +1303,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
                if (!perm)
                        goto eperm;
                ret = copy_from_user(&ui, up, sizeof(struct unimapinit));
-               if (!ret)
+               if (ret)
+                       ret = -EFAULT;
+               else
                        con_clear_unimap(vc, &ui);
                break;
              }