patch-2.1.23 linux/drivers/char/vt.c

Next file: linux/drivers/net/Makefile
Previous file: linux/drivers/char/vga.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.22/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -1111,10 +1111,10 @@
 		    get_user(list, &ud->entries);
 		    i = verify_area(VERIFY_READ, (void *) list,
 				    ct*sizeof(struct unipair));
+		    if(!i)
+			    return con_set_unimap(ct, list);
 		}
-		if (i)
-		  return i;
-		return con_set_unimap(ct, list);
+		return i;
 	      }
 
 	case GIO_UNIMAP:
@@ -1130,10 +1130,10 @@
 		    if (ct)
 		      i = verify_area(VERIFY_WRITE, (void *) list,
 				      ct*sizeof(struct unipair));
+		    if(!i)
+			    return con_get_unimap(ct, &(ud->entry_ct), list);
 		}
-		if (i)
-		  return i;
-		return con_get_unimap(ct, &(ud->entry_ct), list);
+		return i;
 	      }
 	case VT_LOCKSWITCH:
 		if (!suser())

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov