aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-01-16 10:59:51 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:34 -0500
commita45a1e07aa5e4d3dc952c264f87184c5ac8c0a62 (patch)
treecd4113243e7a16574176b3c5543609ebea82340b /drivers/usb/serial/sierra.c
parentaa7907407adf1358ee39be0e98beaf4c129a78d6 (diff)
USB: serial: Eliminate useless code
The variables priv and portdata are initialized twice to the same (side effect-free) expressions. Drop one initialization in each case. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index ea27f7d5acbe..bb0d56c32175 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -477,7 +477,7 @@ static void sierra_outdat_callback(struct urb *urb)
477static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, 477static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
478 const unsigned char *buf, int count) 478 const unsigned char *buf, int count)
479{ 479{
480 struct sierra_port_private *portdata = usb_get_serial_port_data(port); 480 struct sierra_port_private *portdata;
481 struct sierra_intf_private *intfdata; 481 struct sierra_intf_private *intfdata;
482 struct usb_serial *serial = port->serial; 482 struct usb_serial *serial = port->serial;
483 unsigned long flags; 483 unsigned long flags;