mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] USB: misc: usb3503: Fix compiler warning
@ 2013-01-25 16:53 Dongjin Kim
  0 siblings, 0 replies; only message in thread
From: Dongjin Kim @ 2013-01-25 16:53 UTC (permalink / raw)
  Cc: Dongjin Kim, Greg Kroah-Hartman, Fengguang Wu, linux-usb, linux-kernel

This patch fixes the compiler warning of uninitialized variable.

drivers/usb/misc/usb3503.c: In function ‘usb3503_probe’:
drivers/usb/misc/usb3503.c:215:13: warning: ‘mode’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
---
 drivers/usb/misc/usb3503.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index 471218a..f713f6a 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -185,7 +185,7 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 	struct device_node *np = i2c->dev.of_node;
 	struct usb3503 *hub;
 	int err = -ENOMEM;
-	u32 mode;
+	u32 mode = USB3503_MODE_UNKNOWN;
 
 	hub = kzalloc(sizeof(struct usb3503), GFP_KERNEL);
 	if (!hub) {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-25 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 16:53 [PATCH] USB: misc: usb3503: Fix compiler warning Dongjin Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®