Skip to contentSkip to conversation

double put_user in

PATCH New Domen Puncer 1 participant 1 message Jan 16, 2004

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 double put_user in

Hi.

Trivial, this patch was a bit wrong:
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/s390/net/[email protected]

Also "if (error)" is not really needed; put_user returns 0 on success.

drivers/s390/net/ctctty.c +1 -4
@@ -759,10 +759,7 @@ ctc_tty_ioctl(struct tty_struct *tty, st
 			       info->line);
 #endif
 			error = put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
-			if (error)
-				return error;
-			put_user(C_CLOCAL(tty) ? 1 : 0, (ulong *) arg);
-			return 0;
+			return error;
 		case TIOCSSOFTCAR:
 #ifdef CTC_DEBUG_MODEM_IOCTL
 			printk(KERN_DEBUG "%s%d ioctl TIOCSSOFTCAR\n", CTC_TTY_NAME,

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors