OSDN Git Service

USB: gadget: legacy: remove redundant zero assignment to variable 'value'
authorColin Ian King <colin.king@canonical.com>
Wed, 22 Nov 2017 14:40:48 +0000 (14:40 +0000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 11 Dec 2017 10:36:51 +0000 (12:36 +0200)
The variable value is being assigned to zero but that value is never being
read.  Either value is being reassigned in the following if condition, or
it is never read and the function returns. In both cases the assignment is
redundant and can be removed. Cleans up clang warning:

drivers/usb/gadget/legacy/inode.c:1473:4: warning: Value stored to 'value'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/legacy/inode.c

index 9343ec4..cb8e176 100644 (file)
@@ -1470,7 +1470,6 @@ delegate:
                        dev->setup_wLength = w_length;
                        dev->setup_out_ready = 0;
                        dev->setup_out_error = 0;
-                       value = 0;
 
                        /* read DATA stage for OUT right away */
                        if (unlikely (!dev->setup_in && w_length)) {