Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181760
b: refs/heads/master
c: 10ee240
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent f6c24e1 commit 25949f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: ac82f59f9cc6aae3300430fcc3422e59f83d89ae
refs/heads/master: 10ee2402004d03b31555aad7badf7e499fa686d3
19 changes: 10 additions & 9 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ static int gspca_input_connect(struct gspca_dev *dev)
} else {
dev->input_dev = input_dev;
}
} else
err = -EINVAL;
}

return err;
}
Expand Down Expand Up @@ -243,9 +242,8 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev,
return ret;
}

static int gspca_input_create_urb(struct gspca_dev *gspca_dev)
static void gspca_input_create_urb(struct gspca_dev *gspca_dev)
{
int ret = -EINVAL;
struct usb_interface *intf;
struct usb_host_interface *intf_desc;
struct usb_endpoint_descriptor *ep;
Expand All @@ -259,12 +257,11 @@ static int gspca_input_create_urb(struct gspca_dev *gspca_dev)
if (usb_endpoint_dir_in(ep) &&
usb_endpoint_xfer_int(ep)) {

ret = alloc_and_submit_int_urb(gspca_dev, ep);
alloc_and_submit_int_urb(gspca_dev, ep);
break;
}
}
}
return ret;
}

static void gspca_input_destroy_urb(struct gspca_dev *gspca_dev)
Expand Down Expand Up @@ -2289,6 +2286,10 @@ int gspca_dev_probe(struct usb_interface *intf,
goto out;
gspca_set_default_mode(gspca_dev);

ret = gspca_input_connect(gspca_dev);
if (ret)
goto out;

mutex_init(&gspca_dev->usb_lock);
mutex_init(&gspca_dev->read_lock);
mutex_init(&gspca_dev->queue_lock);
Expand All @@ -2310,12 +2311,12 @@ int gspca_dev_probe(struct usb_interface *intf,
usb_set_intfdata(intf, gspca_dev);
PDEBUG(D_PROBE, "%s created", video_device_node_name(&gspca_dev->vdev));

ret = gspca_input_connect(gspca_dev);
if (ret == 0)
ret = gspca_input_create_urb(gspca_dev);
gspca_input_create_urb(gspca_dev);

return 0;
out:
if (gspca_dev->input_dev)
input_unregister_device(gspca_dev->input_dev);
kfree(gspca_dev->usb_buf);
kfree(gspca_dev);
return ret;
Expand Down

0 comments on commit 25949f6

Please sign in to comment.