[PATCH] usb: omap_udc: fix build warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix these two build warnings when building omap2plus_defconfig:
  CC      drivers/usb/gadget/omap_udc.o
drivers/usb/gadget/omap_udc.c: In function 'omap_udc_probe':
drivers/usb/gadget/omap_udc.c:2802: warning: 'hhc_clk' may be used uninitialized in this function
drivers/usb/gadget/omap_udc.c:2801: warning: 'dc_clk' may be used uninitialized in this function

Signed-off-by: Anand Gadiyar <gadiyar@xxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
Not sure if these are false positives, but it does shut the
compiler up.

 drivers/usb/gadget/omap_udc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: mainline/drivers/usb/gadget/omap_udc.c
===================================================================
--- mainline.orig/drivers/usb/gadget/omap_udc.c
+++ mainline/drivers/usb/gadget/omap_udc.c
@@ -2798,8 +2798,8 @@ static int __init omap_udc_probe(struct 
 	struct otg_transceiver	*xceiv = NULL;
 	const char		*type = NULL;
 	struct omap_usb_config	*config = pdev->dev.platform_data;
-	struct clk		*dc_clk;
-	struct clk		*hhc_clk;
+	struct clk		*dc_clk = NULL;
+	struct clk		*hhc_clk = NULL;
 
 	/* NOTE:  "knows" the order of the resources! */
 	if (!request_mem_region(pdev->resource[0].start,
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux