Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271858
b: refs/heads/master
c: 6f6b90c
h: refs/heads/master
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Sep 21, 2011
1 parent 11f8dbe commit 5a4813d
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 59152b1cf1182fd671dafa056cebeed95d0b1468
refs/heads/master: 6f6b90c9231ad6b18f7393e1b6c6cef9dc6aa77c
10 changes: 6 additions & 4 deletions trunk/drivers/media/rc/imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ static void usb_rx_callback_intf0(struct urb *urb)
return;

ictx = (struct imon_context *)urb->context;
if (!ictx)
if (!ictx || !ictx->dev_present_intf0)
return;

switch (urb->status) {
Expand Down Expand Up @@ -1690,7 +1690,7 @@ static void usb_rx_callback_intf1(struct urb *urb)
return;

ictx = (struct imon_context *)urb->context;
if (!ictx)
if (!ictx || !ictx->dev_present_intf1)
return;

switch (urb->status) {
Expand Down Expand Up @@ -2118,7 +2118,6 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)

ictx->dev = dev;
ictx->usbdev_intf0 = usb_get_dev(interface_to_usbdev(intf));
ictx->dev_present_intf0 = true;
ictx->rx_urb_intf0 = rx_urb;
ictx->tx_urb = tx_urb;
ictx->rf_device = false;
Expand Down Expand Up @@ -2157,6 +2156,8 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
goto rdev_setup_failed;
}

ictx->dev_present_intf0 = true;

mutex_unlock(&ictx->lock);
return ictx;

Expand Down Expand Up @@ -2200,7 +2201,6 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
}

ictx->usbdev_intf1 = usb_get_dev(interface_to_usbdev(intf));
ictx->dev_present_intf1 = true;
ictx->rx_urb_intf1 = rx_urb;

ret = -ENODEV;
Expand Down Expand Up @@ -2229,6 +2229,8 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
goto urb_submit_failed;
}

ictx->dev_present_intf1 = true;

mutex_unlock(&ictx->lock);
return ictx;

Expand Down

0 comments on commit 5a4813d

Please sign in to comment.