From 0f3083af5fde121abefddf70c84ba51455ae310f Mon Sep 17 00:00:00 2001 From: Mathieu OTHACEHE Date: Thu, 4 Feb 2016 19:01:28 +0100 Subject: USB: serial: fix returnvar.cocci warnings Remove unneeded variables when "0" can be returned. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Mathieu OTHACEHE Signed-off-by: Johan Hovold --- drivers/usb/serial/cyberjack.c | 3 +-- drivers/usb/serial/garmin_gps.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 2916dea3ede8..5f17a3b9916d 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -140,7 +140,6 @@ static int cyberjack_open(struct tty_struct *tty, { struct cyberjack_private *priv; unsigned long flags; - int result = 0; dev_dbg(&port->dev, "%s - usb_clear_halt\n", __func__); usb_clear_halt(port->serial->dev, port->write_urb->pipe); @@ -152,7 +151,7 @@ static int cyberjack_open(struct tty_struct *tty, priv->wrsent = 0; spin_unlock_irqrestore(&priv->lock, flags); - return result; + return 0; } static void cyberjack_close(struct usb_serial_port *port) diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 9d4170cd5aac..97cabf803c2f 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -860,7 +860,6 @@ static int process_resetdev_request(struct usb_serial_port *port) static int garmin_clear(struct garmin_data *garmin_data_p) { unsigned long flags; - int status = 0; /* flush all queued data */ pkt_clear(garmin_data_p); @@ -870,7 +869,7 @@ static int garmin_clear(struct garmin_data *garmin_data_p) garmin_data_p->outsize = 0; spin_unlock_irqrestore(&garmin_data_p->lock, flags); - return status; + return 0; } -- cgit v1.2.3