diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-02 13:12:36 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-02 13:12:36 +0200 |
commit | be0bb8202ad078bfd0e8c669849aed9983b94bea (patch) | |
tree | 6f0e4a3e102a22f8cce269c2619d78a23b4a66d3 /linux/drivers/media | |
parent | ce05681eb1dbee65c3110182492f84519f264326 (diff) | |
download | mediapointer-dvb-s2-be0bb8202ad078bfd0e8c669849aed9983b94bea.tar.gz mediapointer-dvb-s2-be0bb8202ad078bfd0e8c669849aed9983b94bea.tar.bz2 |
uvc: fix compile warning
From: Hans Verkuil <hverkuil@xs4all.nl>
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.
Priority: high
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_driver.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_driver.c b/linux/drivers/media/video/uvc/uvc_driver.c index 31d60647d..4a69a3af6 100644 --- a/linux/drivers/media/video/uvc/uvc_driver.c +++ b/linux/drivers/media/video/uvc/uvc_driver.c @@ -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); } |