pegasus: Handle disconnect error code correctly.
authorOliver Neukum <oliver@neukum.org>
Fri, 17 Apr 2009 08:40:19 +0000 (01:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2009 08:40:19 +0000 (01:40 -0700)
EPERM means that disconnect() is runnung. It should be treated like
ENODEV

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/pegasus.c

index a8228d87c8cf8255ce0422854ee7533e3cb7c386..2138535f2339e762590d5cdba26a8593de8c1199 100644 (file)
@@ -899,6 +899,7 @@ static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
                        /* cleanup should already have been scheduled */
                        break;
                case -ENODEV:           /* disconnect() upcoming */
+               case -EPERM:
                        netif_device_detach(pegasus->net);
                        break;
                default: