Skip to content

Commit 331b7e0

Browse files
Martin SchwidefskyLinus Torvalds
authored andcommitted
[PATCH] s390 (4/7): ctc driver.
Kernel Janitors: remove unnecessary calls to verify_area.
1 parent 86cb69b commit 331b7e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/s390/net/ctctty.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: ctctty.c,v 1.12 2003/06/17 11:36:44 mschwide Exp $
2+
* $Id: ctctty.c,v 1.13 2003/09/26 14:48:36 mschwide Exp $
33
*
44
* CTC / ESCON network driver, tty interface.
55
*
@@ -758,7 +758,7 @@ ctc_tty_ioctl(struct tty_struct *tty, struct file *file,
758758
printk(KERN_DEBUG "%s%d ioctl TIOCGSOFTCAR\n", CTC_TTY_NAME,
759759
info->line);
760760
#endif
761-
error = verify_area(VERIFY_WRITE, (void *) arg, sizeof(long));
761+
error = put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
762762
if (error)
763763
return error;
764764
put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
@@ -768,10 +768,9 @@ ctc_tty_ioctl(struct tty_struct *tty, struct file *file,
768768
printk(KERN_DEBUG "%s%d ioctl TIOCSSOFTCAR\n", CTC_TTY_NAME,
769769
info->line);
770770
#endif
771-
error = verify_area(VERIFY_READ, (void *) arg, sizeof(long));
771+
error = get_user(arg, (ulong *) arg);
772772
if (error)
773773
return error;
774-
get_user(arg, (ulong *) arg);
775774
tty->termios->c_cflag =
776775
((tty->termios->c_cflag & ~CLOCAL) |
777776
(arg ? CLOCAL : 0));

0 commit comments

Comments
 (0)