usb: dwc3: fix build warnings
authorFelipe Balbi <balbi@ti.com>
Thu, 1 Oct 2015 19:22:18 +0000 (14:22 -0500)
committerMarek Vasut <marex@denx.de>
Sun, 6 Dec 2015 23:14:59 +0000 (00:14 +0100)
fix the following build warnings:

drivers/usb/dwc3/core.c: In function ‘dwc3_uboot_init’:
drivers/usb/dwc3/core.c:625:6: warning: ‘dev’ is used uninitialized in this function [-Wuninitialized]
mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
        ^
drivers/usb/dwc3/dwc3-omap.c: In function ‘dwc3_omap_uboot_init’:
drivers/usb/dwc3/dwc3-omap.c:380:7: warning: ‘dev’ is used uninitialized in this function [-Wuninitialized]
omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/dwc3-omap.c

index 0ae3de5c27b9dcd0611dafc42f9ada8a18be89d0..85cc96ac87b3d663574d33f2e174cb47011965e4 100644 (file)
@@ -613,7 +613,7 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
 int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 {
        struct dwc3             *dwc;
-       struct device           *dev;
+       struct device           *dev = NULL;
        u8                      lpm_nyet_threshold;
        u8                      tx_de_emphasis;
        u8                      hird_threshold;
index ac9a856190f03bf107af581df879202b88a34a7d..3dcc2f4847778b86aead3485e677db75f3829c9e 100644 (file)
@@ -374,7 +374,7 @@ static void dwc3_omap_set_utmi_mode(struct dwc3_omap *omap, int utmi_mode)
 int dwc3_omap_uboot_init(struct dwc3_omap_device *omap_dev)
 {
        u32                     reg;
-       struct device           *dev;
+       struct device           *dev = NULL;
        struct dwc3_omap        *omap;
 
        omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);