From a45a1e07aa5e4d3dc952c264f87184c5ac8c0a62 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 16 Jan 2010 16:59:51 +0100 Subject: 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/) // @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/sierra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/serial/sierra.c') diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index ea27f7d5acb..bb0d56c3217 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) static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, const unsigned char *buf, int count) { - struct sierra_port_private *portdata = usb_get_serial_port_data(port); + struct sierra_port_private *portdata; struct sierra_intf_private *intfdata; struct usb_serial *serial = port->serial; unsigned long flags; -- cgit v1.2.3-70-g09d2