USB: gadget: dummy-hcd: remove redundant initialization of variable 'value'

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>
This commit is contained in:
Colin Ian King 2021-02-17 21:01:24 +00:00 committed by Greg Kroah-Hartman
parent 9c174b57c9
commit 292f750f43
1 changed files with 1 additions and 1 deletions

View File

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