diff options
author | Jarod Wilson <jarod@redhat.com> | 2011-01-06 16:59:34 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 11:45:51 -0200 |
commit | 9ad77eb57b45f81ac3e12077d19e5f121c4cff6d (patch) | |
tree | 238a30b269d3d452c74623e55aa4c08fe806e2c6 | |
parent | 2e4c55626a0c30b5b2bc9469c025a563a81c3785 (diff) | |
download | kernel_samsung_espresso10-9ad77eb57b45f81ac3e12077d19e5f121c4cff6d.zip kernel_samsung_espresso10-9ad77eb57b45f81ac3e12077d19e5f121c4cff6d.tar.gz kernel_samsung_espresso10-9ad77eb57b45f81ac3e12077d19e5f121c4cff6d.tar.bz2 |
[media] rc/imon: need to submit urb before ffdc type check
Otherwise, we have a null receive buffer, and the logic all falls down,
goes boom, all ffdc devs wind up as imon IR w/VFD. Oops.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/rc/imon.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index a30bd99..7034207 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -2110,18 +2110,6 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) goto find_endpoint_failed; } - ictx->idev = imon_init_idev(ictx); - if (!ictx->idev) { - dev_err(dev, "%s: input device setup failed\n", __func__); - goto idev_setup_failed; - } - - ictx->rdev = imon_init_rdev(ictx); - if (!ictx->rdev) { - dev_err(dev, "%s: rc device setup failed\n", __func__); - goto rdev_setup_failed; - } - usb_fill_int_urb(ictx->rx_urb_intf0, ictx->usbdev_intf0, usb_rcvintpipe(ictx->usbdev_intf0, ictx->rx_endpoint_intf0->bEndpointAddress), @@ -2135,13 +2123,25 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) goto urb_submit_failed; } + ictx->idev = imon_init_idev(ictx); + if (!ictx->idev) { + dev_err(dev, "%s: input device setup failed\n", __func__); + goto idev_setup_failed; + } + + ictx->rdev = imon_init_rdev(ictx); + if (!ictx->rdev) { + dev_err(dev, "%s: rc device setup failed\n", __func__); + goto rdev_setup_failed; + } + return ictx; -urb_submit_failed: - rc_unregister_device(ictx->rdev); rdev_setup_failed: input_unregister_device(ictx->idev); idev_setup_failed: + usb_kill_urb(ictx->rx_urb_intf0); +urb_submit_failed: find_endpoint_failed: mutex_unlock(&ictx->lock); usb_free_urb(tx_urb); |