Skip to contentSkip to conversation

USB: serial: remove duplicate returns

PATCH In review Dan Carpenter 2 participants 2 messages Aug 6, 2011 – Aug 10, 2011

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

PATCH 1/1 USB: serial: remove duplicate returns

This small untidiness with two returns in a row was copy and pasted into mos7720.c and mos7840.c.

drivers/usb/serial/mos7720.c +0 -1
index 40abedb..3524a10 100644
@@ -2006,7 +2006,6 @@ static int mos7720_ioctl(struct tty_struct *tty,
 		dbg("%s (%d) TIOCSERGETLSR", __func__,  port->number);
 		return get_lsr_info(tty, mos7720_port,
 					(unsigned int __user *)arg);
-		return 0;
 
 	/* FIXME: These should be using the mode methods */
 	case TIOCMBIS:
drivers/usb/serial/mos7840.c +0 -1
index 7b50aa1..c72abd5 100644
@@ -2263,7 +2263,6 @@ static int mos7840_ioctl(struct tty_struct *tty,
 	case TIOCSERGETLSR:
 		dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
 		return mos7840_get_lsr_info(tty, argp);
-		return 0;
 
 	case TIOCGSERIAL:
 		dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
#1 lore raw
Quoted 22 lines · Dan Carpenter

This small untidiness with two returns in a row was copy and pasted into mos7720.c and mos7840.c.

drivers/usb/serial/mos7720.c +0 -1
index 40abedb..3524a10 100644
@@ -2006,7 +2006,6 @@ static int mos7720_ioctl(struct tty_struct *tty,
 		dbg("%s (%d) TIOCSERGETLSR", __func__,  port->number);
 		return get_lsr_info(tty, mos7720_port,
 					(unsigned int __user *)arg);
-		return 0;
 
 	/* FIXME: These should be using the mode methods */
 	case TIOCMBIS:
drivers/usb/serial/mos7840.c +0 -0
index 7b50aa1..c72abd5 100644

drivers/usb/serial/mos7840.c static int mos7840_ioctl(struct tty_struct *tty, · line 2268

Quoted 7 lines
drivers/usb/serial/mos7840.c +0 -1
@@ -2263,7 +2263,6 @@ static int mos7840_ioctl(struct tty_struct *tty,
 	case TIOCSERGETLSR:
 		dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
 		return mos7840_get_lsr_info(tty, argp);
-		return 0;
 
 	case TIOCGSERIAL:
 		dbg("%s (%d) TIOCGSERIAL", __func__, port->number);

Doesn't seem to be in linux-next as of today, so I have picked it up.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs