Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330625
b: refs/heads/master
c: ffe4ac9
h: refs/heads/master
i:
  330623: ba38df3
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent 4791ab0 commit 604cb58
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 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: c65bcb95beec39402cb574faa2e17aa1e56c1534
refs/heads/master: ffe4ac92ee5a4a0a236b9583c3173902e158e14b
20 changes: 16 additions & 4 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,24 @@ static void dvb_usbv2_init_work(struct work_struct *work)
KBUILD_MODNAME, d->name);
ret = dvb_usbv2_download_firmware(d);
if (ret == 0) {
/* device is warm, continue initialization */
;
} else if (ret == RECONNECTS_USB) {
ret = 0;
goto exit_usb_driver_release_interface;
/*
* USB core will call disconnect() and then probe()
* as device reconnects itself from the USB bus.
* disconnect() will release all driver resources
* and probe() is called for 'new' device. As 'new'
* device is warm we should never go here again.
*/
return;
} else {
/* Unexpected fatal error. We must unregister driver
* manually from the device, because device is already
* register by returning from probe() with success.
* usb_driver_release_interface() finally calls
* disconnect() in order to free resources.
*/
goto err_usb_driver_release_interface;
}
}
Expand All @@ -453,8 +466,7 @@ static void dvb_usbv2_init_work(struct work_struct *work)
err_usb_driver_release_interface:
pr_info("%s: '%s' error while loading driver (%d)\n", KBUILD_MODNAME,
d->name, ret);
exit_usb_driver_release_interface:
/* it finally calls .disconnect() which frees mem */
/* it finally calls disconnect() which frees mem */
usb_driver_release_interface(to_usb_driver(d->intf->dev.driver),
d->intf);
pr_debug("%s: failed=%d\n", __func__, ret);
Expand Down

0 comments on commit 604cb58

Please sign in to comment.