[SLOF] [PATCH] usb-xhci: initialize field4 to zero
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Thu Jun 2 19:58:36 AEST 2016
Static analysis tool reported:
file lib/libusb/usb-xhci.c
line 1022
uninitialized `field4'
file lib/libusb/usb-xhci.c
line 1036
uninitialized `field4'
Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
---
lib/libusb/usb-xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c
index 3bbc9af..f8b1996 100644
--- a/lib/libusb/usb-xhci.c
+++ b/lib/libusb/usb-xhci.c
@@ -1012,7 +1012,7 @@ static void fill_setup_trb(struct xhci_command_trb *cmd, struct usb_dev_req *req
static void fill_setup_data(struct xhci_command_trb *cmd, void *data,
uint32_t size, uint32_t dir)
{
- uint32_t field1, field2, field3, field4;
+ uint32_t field1, field2, field3, field4 = 0;
field1 = TRB_ADDR_LOW(data);
field2 = TRB_ADDR_HIGH(data);
@@ -1025,7 +1025,7 @@ static void fill_setup_data(struct xhci_command_trb *cmd, void *data,
static void fill_status_trb(struct xhci_command_trb *cmd, uint32_t dir)
{
- uint32_t field1, field2, field3, field4;
+ uint32_t field1, field2, field3, field4 = 0;
field1 = 0;
field2 = 0;
--
2.5.5
More information about the SLOF
mailing list