diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-05-02 07:12:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-09 17:52:40 -0400 |
commit | 7564f67d5b38eb814e67edd8ba0c70fd8eb475b6 (patch) | |
tree | 1569ef2e417cd052445cf3b60f3c93dd1708f3f9 /drivers/media/video/uvc | |
parent | 34a7864db1bc6d9ceb466251957fccf90c7106f8 (diff) |
V4L/DVB (11669): uvc: fix compile warning
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>
Diffstat (limited to 'drivers/media/video/uvc')
-rw-r--r-- | drivers/media/video/uvc/uvc_driver.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 399412d7f020..507dc85646b2 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c | |||
@@ -1726,14 +1726,17 @@ static int uvc_suspend(struct usb_interface *intf, pm_message_t message) | |||
1726 | static int __uvc_resume(struct usb_interface *intf, int reset) | 1726 | static int __uvc_resume(struct usb_interface *intf, int reset) |
1727 | { | 1727 | { |
1728 | struct uvc_device *dev = usb_get_intfdata(intf); | 1728 | struct uvc_device *dev = usb_get_intfdata(intf); |
1729 | int ret; | ||
1730 | 1729 | ||
1731 | uvc_trace(UVC_TRACE_SUSPEND, "Resuming interface %u\n", | 1730 | uvc_trace(UVC_TRACE_SUSPEND, "Resuming interface %u\n", |
1732 | intf->cur_altsetting->desc.bInterfaceNumber); | 1731 | intf->cur_altsetting->desc.bInterfaceNumber); |
1733 | 1732 | ||
1734 | if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) { | 1733 | if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) { |
1735 | if (reset && (ret = uvc_ctrl_resume_device(dev)) < 0) | 1734 | if (reset) { |
1736 | return ret; | 1735 | int ret = uvc_ctrl_resume_device(dev); |
1736 | |||
1737 | if (ret < 0) | ||
1738 | return ret; | ||
1739 | } | ||
1737 | 1740 | ||
1738 | return uvc_status_resume(dev); | 1741 | return uvc_status_resume(dev); |
1739 | } | 1742 | } |