* [PATCH 1/2] ems_usb: Removed double netif_device_detach
@ 2011-12-22 22:57 Sebastian Haas
2012-01-31 22:03 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Haas @ 2011-12-22 22:57 UTC (permalink / raw)
To: Linux-can Mailing List; +Cc: Marc Kleine-Budde
From fc832ed7b4c824007f73dc8618915bdfd6375e07 Mon Sep 17 00:00:00 2001
From: Sebastian Haas <dev@sebastianhaas.info>
Date: Thu, 22 Dec 2011 22:48:27 +0100
Subject: [PATCH 1/2] 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>
---
drivers/net/can/usb/ems_usb.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index a72c7bf..55ab0c4 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,12 +656,8 @@ 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);
-
return err;
}
@@ -692,9 +685,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;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] ems_usb: Removed double netif_device_detach
2011-12-22 22:57 [PATCH 1/2] ems_usb: Removed double netif_device_detach Sebastian Haas
@ 2012-01-31 22:03 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2012-01-31 22:03 UTC (permalink / raw)
To: Sebastian Haas; +Cc: Linux-can Mailing List
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
On 12/22/2011 11:57 PM, Sebastian Haas wrote:
> From fc832ed7b4c824007f73dc8618915bdfd6375e07 Mon Sep 17 00:00:00 2001
> From: Sebastian Haas <dev@sebastianhaas.info>
> Date: Thu, 22 Dec 2011 22:48:27 +0100
> Subject: [PATCH 1/2] 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>
Can you please send with "git send-email" the next time. Your mailer
converts tabs to spaces. I applied your patch by hand.
Applied to can-next.
tnx Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-31 22:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 22:57 [PATCH 1/2] ems_usb: Removed double netif_device_detach Sebastian Haas
2012-01-31 22:03 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).