usb: gadget: legacy: fix redundant initialization warnings from cppcheck
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 3 Apr 2020 13:16:51 +0000 (22:16 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Apr 2020 12:32:46 +0000 (14:32 +0200)
commit081c95df8992b738fd6462f3a420d8892d7f6d71
tree4ddb13d8a3d1b6bc36f635c7fd13c2da3888e0b9
parent48ce9e4119ce24131d188746118e948e9e97fc1d
usb: gadget: legacy: fix redundant initialization warnings from cppcheck

Fix the following cppcheck warnings:

drivers/usb/gadget/legacy/inode.c:1364:8: style: Redundant initialization for 'value'. The initialized value is overwritten$
 value = -EOPNOTSUPP;
       ^
drivers/usb/gadget/legacy/inode.c:1331:15: note: value is initialized
 int    value = -EOPNOTSUPP;
              ^
drivers/usb/gadget/legacy/inode.c:1364:8: note: value is overwritten
 value = -EOPNOTSUPP;
       ^
drivers/usb/gadget/legacy/inode.c:1817:8: style: Redundant initialization for 'value'. The initialized value is overwritten$
 value = -EINVAL;
       ^
drivers/usb/gadget/legacy/inode.c:1787:18: note: value is initialized
 ssize_t   value = len, length = len;
                 ^
drivers/usb/gadget/legacy/inode.c:1817:8: note: value is overwritten
 value = -EINVAL;
       ^

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200403131652.8183-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/inode.c