usb: cdc-wdm: remove redundant assignment to rv
authorColin Ian King <colin.king@canonical.com>
Fri, 31 May 2019 13:53:47 +0000 (14:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Jun 2019 13:21:56 +0000 (15:21 +0200)
The variable rv is assigned with a value that is never read and
it is re-assigned a new value on the next statement. The
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c

index 9e9caff..a7824a5 100644 (file)
@@ -949,7 +949,7 @@ struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf,
                                        int bufsize,
                                        int (*manage_power)(struct usb_interface *, int))
 {
-       int rv = -EINVAL;
+       int rv;
 
        rv = wdm_create(intf, ep, bufsize, manage_power);
        if (rv < 0)