* [PATCH] USB: DL100B webmail notifier: initialize return value
@ 2010-12-22 12:55 Melchior FRANZ
0 siblings, 0 replies; only message in thread
From: Melchior FRANZ @ 2010-12-22 12:55 UTC (permalink / raw)
To: linux-usb, linux-kernel, Greg KH
From: Melchior FRANZ <mfranz@aon.at>
If case of an unknown usb_device_id->driver_info (which could only
occur if the info got corrupted somewhere outside the usbled driver),
a debug message depended on an uninitialized value. This was harmless,
but ugly, and gets fixed with this patch.
Signed-off-by: Melchior FRANZ <mfranz@aon.at>
---
@Greg:
Argh ... sorry about that. The build system didn't warn me, not even
with EXTRA_CFLAGS=-W. And cppcheck ignored the problem as well. This
must be a plot to damage my reputation! :-}
m.
drivers/usb/misc/usbled.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index 1732d9b..1616ad1 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -45,7 +45,7 @@ struct usb_led {
static void change_color(struct usb_led *led)
{
- int retval;
+ int retval = 0;
unsigned char *buffer;
buffer = kmalloc(8, GFP_KERNEL);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-22 12:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-22 12:55 [PATCH] USB: DL100B webmail notifier: initialize return value Melchior FRANZ
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).