]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] janitor: dz: verify_area() removal
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:46:09 +0000 (18:46 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:46:09 +0000 (18:46 -0800)
From: "Randy.Dunlap" <rddunlap@osdl.org>,
      Domen Puncer <domen@coderock.org>

drivers/char/dz.c

index 2d9328e24e80699fc333fc86b333ca786099463c..2a1d323393df7947e21998b2922e87d9c2db099a 100644 (file)
@@ -986,11 +986,7 @@ static int dz_ioctl(struct tty_struct *tty, struct file *file,
                return 0;
 
        case TIOCGSOFTCAR:
-               error = verify_area (VERIFY_WRITE, (void *)arg, sizeof(long));
-               if (error)
-                       return error;
-               put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg);
-               return 0;
+               return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg);
 
        case TIOCSSOFTCAR:
                if (get_user (arg, (unsigned long *)arg))
@@ -1001,10 +997,6 @@ static int dz_ioctl(struct tty_struct *tty, struct file *file,
                return 0;
 
        case TIOCGSERIAL:
-               error = verify_area(VERIFY_WRITE, (void *)arg,
-                                   sizeof(struct serial_struct));
-               if (error)
-                       return error;
                return get_serial_info(info, (struct serial_struct *)arg);
 
        case TIOCSSERIAL: