summaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorSebastian Haas <dev@sebastianhaas.info>2011-12-22 23:57:49 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2012-02-03 01:20:51 +0100
commitf84cbda06f79f05b748707b33b925b50c2fedc84 (patch)
tree80e13e6acb403b1af8f189bf90799c12fc7954c6 /drivers/net/can
parente1f4c485cdb2b1d7aae172b731f6c2b403381ebb (diff)
downloadblackbird-op-linux-f84cbda06f79f05b748707b33b925b50c2fedc84.tar.gz
blackbird-op-linux-f84cbda06f79f05b748707b33b925b50c2fedc84.zip
can: ems_usb: Removed double netif_device_detach
netif_device_attched is called twice when ems_usb_start fails with -ENODEV Signed-off-by: Sebastian Haas <dev@sebastianhaas.info> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/usb/ems_usb.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index 9697c14b8dc6..7dae64d44e83 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -627,9 +627,6 @@ static int ems_usb_start(struct ems_usb *dev)
err = usb_submit_urb(urb, GFP_KERNEL);
if (err) {
- if (err == -ENODEV)
- netif_device_detach(dev->netdev);
-
usb_unanchor_urb(urb);
usb_free_coherent(dev->udev, RX_BUFFER_SIZE, buf,
urb->transfer_dma);
@@ -659,9 +656,6 @@ static int ems_usb_start(struct ems_usb *dev)
err = usb_submit_urb(dev->intr_urb, GFP_KERNEL);
if (err) {
- if (err == -ENODEV)
- netif_device_detach(dev->netdev);
-
dev_warn(netdev->dev.parent, "intr URB submit failed: %d\n",
err);
@@ -692,9 +686,6 @@ static int ems_usb_start(struct ems_usb *dev)
return 0;
failed:
- if (err == -ENODEV)
- netif_device_detach(dev->netdev);
-
dev_warn(netdev->dev.parent, "couldn't submit control: %d\n", err);
return err;
OpenPOWER on IntegriCloud