USB: serial: iuu_phoenix: drop unused URB submission results
authorJohan Hovold <johan@kernel.org>
Wed, 1 Jul 2020 16:53:39 +0000 (18:53 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 2 Jul 2020 08:38:42 +0000 (10:38 +0200)
The driver is submitting URBs in various completion callbacks without
bothering to log errors yet still assigned the return value to temporary
variables. Let's drop those temporaries.

This suppresses the corresponding W=1 (-Wunused-but-set-variable)
warnings.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/iuu_phoenix.c

index d5bff69b1769b28610ec0d874a97ce5e385d782a..6336616fee499d0cf3cabd972f5158477b17d8fe 100644 (file)
@@ -158,7 +158,6 @@ static int iuu_tiocmget(struct tty_struct *tty)
 static void iuu_rxcmd(struct urb *urb)
 {
        struct usb_serial_port *port = urb->context;
-       int result;
        int status = urb->status;
 
        if (status) {
@@ -174,7 +173,7 @@ static void iuu_rxcmd(struct urb *urb)
                                          port->bulk_out_endpointAddress),
                          port->write_urb->transfer_buffer, 1,
                          read_rxcmd_callback, port);
-       result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+       usb_submit_urb(port->write_urb, GFP_ATOMIC);
 }
 
 static int iuu_reset(struct usb_serial_port *port, u8 wt)
@@ -241,7 +240,6 @@ static void iuu_update_status_callback(struct urb *urb)
 static void iuu_status_callback(struct urb *urb)
 {
        struct usb_serial_port *port = urb->context;
-       int result;
        int status = urb->status;
 
        dev_dbg(&port->dev, "%s - status = %d\n", __func__, status);
@@ -250,7 +248,7 @@ static void iuu_status_callback(struct urb *urb)
                                          port->bulk_in_endpointAddress),
                          port->read_urb->transfer_buffer, 256,
                          iuu_update_status_callback, port);
-       result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+       usb_submit_urb(port->read_urb, GFP_ATOMIC);
 }
 
 static int iuu_status(struct usb_serial_port *port)
@@ -351,7 +349,6 @@ static void iuu_rgbf_fill_buffer(u8 *buf, u8 r1, u8 r2, u8 g1, u8 g2, u8 b1,
 static void iuu_led_activity_on(struct urb *urb)
 {
        struct usb_serial_port *port = urb->context;
-       int result;
        char *buf_ptr = port->write_urb->transfer_buffer;
        *buf_ptr++ = IUU_SET_LED;
        if (xmas) {
@@ -366,13 +363,12 @@ static void iuu_led_activity_on(struct urb *urb)
                                          port->bulk_out_endpointAddress),
                          port->write_urb->transfer_buffer, 8 ,
                          iuu_rxcmd, port);
-       result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+       usb_submit_urb(port->write_urb, GFP_ATOMIC);
 }
 
 static void iuu_led_activity_off(struct urb *urb)
 {
        struct usb_serial_port *port = urb->context;
-       int result;
        char *buf_ptr = port->write_urb->transfer_buffer;
        if (xmas) {
                iuu_rxcmd(urb);
@@ -386,7 +382,7 @@ static void iuu_led_activity_off(struct urb *urb)
                                          port->bulk_out_endpointAddress),
                          port->write_urb->transfer_buffer, 8 ,
                          iuu_rxcmd, port);
-       result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
+       usb_submit_urb(port->write_urb, GFP_ATOMIC);
 }