From: Matthew Martin Date: Wed, 15 Feb 2006 21:41:25 +0000 (-0600) Subject: [PATCH] USB: Fix warning in drivers/usb/media/ov511.c X-Git-Tag: v2.6.17-rc1~1176^2~31 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=addf36fec058691f7ba4f95b5487d140f4a86f5a;p=linux-2.6 [PATCH] USB: Fix warning in drivers/usb/media/ov511.c 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c index cfec8c6157..1d887ec060 100644 --- a/drivers/usb/media/ov511.c +++ b/drivers/usb/media/ov511.c @@ -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;