From: Oliver Neukum Date: Fri, 17 Apr 2009 08:40:19 +0000 (-0700) Subject: pegasus: Handle disconnect error code correctly. X-Git-Tag: v2.6.30-rc4~3^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dd014eb9804f19d6230c3cbc10fa25f5416bda7;p=profile%2Fivi%2Fkernel-x86-ivi.git pegasus: Handle disconnect error code correctly. EPERM means that disconnect() is runnung. It should be treated like ENODEV Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index a8228d8..2138535 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -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: