Commit 533d1e0f authored by Duncan Sands's avatar Duncan Sands Committed by Greg Kroah-Hartman

[PATCH] USB speedtouch: be firm when disconnected

Just say -ENODEV
parent 10a2657b
...@@ -648,9 +648,9 @@ static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb) ...@@ -648,9 +648,9 @@ static int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb)
dbg ("udsl_atm_send called (skb 0x%p, len %u)", skb, skb->len); dbg ("udsl_atm_send called (skb 0x%p, len %u)", skb, skb->len);
if (!instance) { if (!instance || !instance->usb_dev) {
dbg ("NULL instance!"); dbg ("NULL data!");
return -EINVAL; return -ENODEV;
} }
if (!instance->firmware_loaded) if (!instance->firmware_loaded)
...@@ -701,6 +701,7 @@ static void udsl_atm_dev_close (struct atm_dev *dev) ...@@ -701,6 +701,7 @@ static void udsl_atm_dev_close (struct atm_dev *dev)
tasklet_kill (&instance->send_tasklet); tasklet_kill (&instance->send_tasklet);
dbg ("udsl_atm_dev_close: freeing instance"); dbg ("udsl_atm_dev_close: freeing instance");
kfree (instance); kfree (instance);
dev->dev_data = NULL;
} }
...@@ -776,8 +777,8 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) ...@@ -776,8 +777,8 @@ static int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
dbg ("udsl_atm_open called"); dbg ("udsl_atm_open called");
if (!instance) { if (!instance || !instance->usb_dev) {
dbg ("NULL instance!"); dbg ("NULL data!");
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment