]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: dwc2: host: fix Wmaybe-uninitialized warning
authorNicholas Mc Guire <hofrat@osadl.org>
Thu, 12 Jan 2017 16:33:26 +0000 (17:33 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 16 Jan 2017 09:11:51 +0000 (11:11 +0200)
Uninitialized char* causes a sparse build-warning, fix it up by
initializing it to NULL.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c

index 8b264d4aaaebfafb8ceebbc09fb65508df65feeb..46d0ad5105e40e5818e590a957072a48066c5ae0 100644 (file)
@@ -4492,8 +4492,8 @@ static void dwc2_dump_urb_info(struct usb_hcd *hcd, struct urb *urb,
 {
 #ifdef VERBOSE_DEBUG
        struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd);
-       char *pipetype;
-       char *speed;
+       char *pipetype = NULL;
+       char *speed = NULL;
 
        dev_vdbg(hsotg->dev, "%s, urb %p\n", fn_name, urb);
        dev_vdbg(hsotg->dev, "  Device address: %d\n",