Skip to content

Commit

Permalink
V4L/DVB (11669): uvc: fix compile warning
Browse files Browse the repository at this point in the history
The 2.6.30 kernel generates this warning:

uvc_driver.c:1729: warning: 'ret' may be used uninitialized in this function

I guess some new warning flag must have been turned on since this warning
didn't appear with older kernels (gcc version 4.3.1). It's also a bogus
warning, but since this code didn't comply to the coding standard anyway
I've modified it to 1) remove the warning and 2) conform to the coding
standard.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 9, 2009
1 parent 34a7864 commit 7564f67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/media/video/uvc/uvc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1726,14 +1726,17 @@ static int uvc_suspend(struct usb_interface *intf, pm_message_t message)
static int __uvc_resume(struct usb_interface *intf, int reset)
{
struct uvc_device *dev = usb_get_intfdata(intf);
int ret;

uvc_trace(UVC_TRACE_SUSPEND, "Resuming interface %u\n",
intf->cur_altsetting->desc.bInterfaceNumber);

if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) {
if (reset && (ret = uvc_ctrl_resume_device(dev)) < 0)
return ret;
if (reset) {
int ret = uvc_ctrl_resume_device(dev);

if (ret < 0)
return ret;
}

return uvc_status_resume(dev);
}
Expand Down

0 comments on commit 7564f67

Please sign in to comment.