Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330597
b: refs/heads/master
c: 3676403
h: refs/heads/master
i:
  330595: fee9836
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent 00aae46 commit e3c79be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 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: 6b8c8c40894a88035fb29472a25f6864cd2e8197
refs/heads/master: 36764037640e1892d769cfcfe1df51b985d84563
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ struct dvb_usb_device_properties {
const char *driver_name;
struct module *owner;
short *adapter_nr;
u8 bInterfaceNumber;

int size_of_priv;

Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/media/dvb/dvb-usb/dvb_usb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ int dvb_usbv2_probe(struct usb_interface *intf,
struct dvb_usb_driver_info *driver_info =
(struct dvb_usb_driver_info *) id->driver_info;

pr_debug("%s:\n", __func__);
pr_debug("%s: bInterfaceNumber=%d\n", __func__,
intf->cur_altsetting->desc.bInterfaceNumber);

if (!id->driver_info) {
pr_err("%s: driver_info failed\n", KBUILD_MODNAME);
Expand All @@ -371,6 +372,13 @@ int dvb_usbv2_probe(struct usb_interface *intf,
d->intf = intf;
memcpy(&d->props, driver_info->props,
sizeof(struct dvb_usb_device_properties));

if (d->intf->cur_altsetting->desc.bInterfaceNumber !=
d->props.bInterfaceNumber) {
ret = 0;
goto exit_kfree;
}

mutex_init(&d->usb_mutex);
mutex_init(&d->i2c_mutex);
INIT_WORK(&d->probe_work, dvb_usbv2_init_work);
Expand All @@ -384,6 +392,7 @@ int dvb_usbv2_probe(struct usb_interface *intf,
return 0;
err_kfree:
usb_set_intfdata(intf, NULL);
exit_kfree:
kfree(d);
err:
pr_debug("%s: failed=%d\n", __func__, ret);
Expand Down

0 comments on commit e3c79be

Please sign in to comment.