USB: gadget: dummy-hcd: remove redundant initialization of variable 'value'
authorColin Ian King <colin.king@canonical.com>
Wed, 17 Feb 2021 21:01:24 +0000 (21:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:37:15 +0000 (09:37 +0100)
The variable 'value' is being initialized with 1 that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Unused value")
Link: https://lore.kernel.org/r/20210217210124.197780-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/dummy_hcd.c

index 57067763b1005f7fcd021b5012cb7d1b11b97639..ce24d4f28f2a953cc9338c15f281f90fd431a341 100644 (file)
@@ -1866,7 +1866,7 @@ restart:
                /* handle control requests */
                if (ep == &dum->ep[0] && ep->setup_stage) {
                        struct usb_ctrlrequest          setup;
-                       int                             value = 1;
+                       int                             value;
 
                        setup = *(struct usb_ctrlrequest *) urb->setup_packet;
                        /* paranoia, in case of stale queued data */