Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61285
b: refs/heads/master
c: 783aa8f
h: refs/heads/master
i:
  61283: e3c33ba
v: v3
  • Loading branch information
Akinobu Mita authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent c5d0cf4 commit ea1562f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b9d313c38291c6d60f1fbf6a2bc62c484fdaa21
refs/heads/master: 783aa8fa1fe666a039edb784d9458647da97d28a
17 changes: 9 additions & 8 deletions trunk/drivers/media/video/zr364xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,27 +792,27 @@ static int zr364xx_probe(struct usb_interface *intf,
{
struct usb_device *udev = interface_to_usbdev(intf);
struct zr364xx_camera *cam = NULL;
int err;

DBG("probing...");

info(DRIVER_DESC " compatible webcam plugged");
info("model %04x:%04x detected", udev->descriptor.idVendor,
udev->descriptor.idProduct);

if ((cam =
kmalloc(sizeof(struct zr364xx_camera), GFP_KERNEL)) == NULL) {
cam = kzalloc(sizeof(struct zr364xx_camera), GFP_KERNEL);
if (cam == NULL) {
info("cam: out of memory !");
return -ENODEV;
return -ENOMEM;
}
memset(cam, 0x00, sizeof(struct zr364xx_camera));
/* save the init method used by this camera */
cam->method = id->driver_info;

cam->vdev = video_device_alloc();
if (cam->vdev == NULL) {
info("cam->vdev: out of memory !");
kfree(cam);
return -ENODEV;
return -ENOMEM;
}
memcpy(cam->vdev, &zr364xx_template, sizeof(zr364xx_template));
video_set_drvdata(cam->vdev, cam);
Expand Down Expand Up @@ -858,12 +858,13 @@ static int zr364xx_probe(struct usb_interface *intf,
cam->brightness = 64;
mutex_init(&cam->lock);

if (video_register_device(cam->vdev, VFL_TYPE_GRABBER, -1) == -1) {
err = video_register_device(cam->vdev, VFL_TYPE_GRABBER, -1);
if (err) {
info("video_register_device failed");
video_device_release(cam->vdev);
kfree(cam->buffer);
kfree(cam);
return -ENODEV;
return err;
}

usb_set_intfdata(intf, cam);
Expand Down Expand Up @@ -905,7 +906,7 @@ static struct usb_driver zr364xx_driver = {
static int __init zr364xx_init(void)
{
int retval;
retval = usb_register(&zr364xx_driver) < 0;
retval = usb_register(&zr364xx_driver);
if (retval)
info("usb_register failed!");
else
Expand Down

0 comments on commit ea1562f

Please sign in to comment.