]> err.no Git - linux-2.6/commitdiff
[PATCH] USB: Fix warning in drivers/usb/media/ov511.c
authorMatthew Martin <lihnucks@gmail.com>
Wed, 15 Feb 2006 21:41:25 +0000 (15:41 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:49:58 +0000 (14:49 -0800)
Gcc 4.0.2 had the warning:

drivers/usb/media/ov511.c: In function 'show_exposure':
drivers/usb/media/ov511.c:5642: warning: 'exp' may be used uninitialized
in this function

Here is the patch to fix that warning.

Signed-off-by: Matthew Martin <lihnucks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/media/ov511.c

index cfec8c61574e4ed707d1c1b469d93aef4e64fabf..1d887ec06080dc2e05beeff67bedac584ef271f1 100644 (file)
@@ -5639,7 +5639,7 @@ static CLASS_DEVICE_ATTR(hue, S_IRUGO, show_hue, NULL);
 static ssize_t show_exposure(struct class_device *cd, char *buf)
 {
        struct usb_ov511 *ov = cd_to_ov(cd);
-       unsigned char exp;
+       unsigned char exp = 0;
 
        if (!ov->dev)
                return -ENODEV;