aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvideo
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-10 08:05:45 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-10 08:05:45 -0400
commit3ce9bcb583536c45a46c7302747029450e22279c (patch)
tree7a4167189ffc6dc909151d1a5d040f9f0656a9f4 /drivers/media/video/usbvideo
parent26fd10517e810dd59ea050b052de24a75ee6dc07 (diff)
parentf7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81 (diff)
Merge branch 'core/xen' into x86/xen
Diffstat (limited to 'drivers/media/video/usbvideo')
-rw-r--r--drivers/media/video/usbvideo/ibmcam.c6
-rw-r--r--drivers/media/video/usbvideo/vicam.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/usbvideo/ibmcam.c b/drivers/media/video/usbvideo/ibmcam.c
index 59166b760104..cc27efe121dd 100644
--- a/drivers/media/video/usbvideo/ibmcam.c
+++ b/drivers/media/video/usbvideo/ibmcam.c
@@ -736,12 +736,12 @@ static enum ParseState ibmcam_model2_320x240_parse_lines(
736 * make black color and quit the horizontal scanning loop. 736 * make black color and quit the horizontal scanning loop.
737 */ 737 */
738 if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) { 738 if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {
739 const int j = i * V4L_BYTES_PER_PIXEL; 739 const int offset = i * V4L_BYTES_PER_PIXEL;
740#if USES_IBMCAM_PUTPIXEL 740#if USES_IBMCAM_PUTPIXEL
741 /* Refresh 'f' because we don't use it much with PUTPIXEL */ 741 /* Refresh 'f' because we don't use it much with PUTPIXEL */
742 f = frame->data + (v4l_linesize * frame->curline) + j; 742 f = frame->data + (v4l_linesize * frame->curline) + offset;
743#endif 743#endif
744 memset(f, 0, v4l_linesize - j); 744 memset(f, 0, v4l_linesize - offset);
745 break; 745 break;
746 } 746 }
747 747
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c
index b7792451a299..2eb45829791c 100644
--- a/drivers/media/video/usbvideo/vicam.c
+++ b/drivers/media/video/usbvideo/vicam.c
@@ -866,7 +866,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
866 cam->udev = dev; 866 cam->udev = dev;
867 cam->bulkEndpoint = bulkEndpoint; 867 cam->bulkEndpoint = bulkEndpoint;
868 868
869 if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, -1) == -1) { 869 if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, -1) < 0) {
870 kfree(cam); 870 kfree(cam);
871 printk(KERN_WARNING "video_register_device failed\n"); 871 printk(KERN_WARNING "video_register_device failed\n");
872 return -EIO; 872 return -EIO;