* [PATCH] USB speedtouch: be firm when disconnected
@ 2003-02-28 9:15 Duncan Sands
2003-02-28 21:32 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Duncan Sands @ 2003-02-28 9:15 UTC (permalink / raw)
To: linux-usb-devel; +Cc: Greg KH, linux-kernel
Just say -ENODEV
speedtouch.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c Fri Feb 28 10:09:04 2003
+++ b/drivers/usb/misc/speedtouch.c Fri Feb 28 10:09:04 2003
@@ -648,9 +648,9 @@
dbg ("udsl_atm_send called (skb 0x%p, len %u)", skb, skb->len);
- if (!instance) {
- dbg ("NULL instance!");
- return -EINVAL;
+ if (!instance || !instance->usb_dev) {
+ dbg ("NULL data!");
+ return -ENODEV;
}
if (!instance->firmware_loaded)
@@ -701,6 +701,7 @@
tasklet_kill (&instance->send_tasklet);
dbg ("udsl_atm_dev_close: freeing instance");
kfree (instance);
+ dev->dev_data = NULL;
}
@@ -776,8 +777,8 @@
dbg ("udsl_atm_open called");
- if (!instance) {
- dbg ("NULL instance!");
+ if (!instance || !instance->usb_dev) {
+ dbg ("NULL data!");
return -ENODEV;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] USB speedtouch: be firm when disconnected
2003-02-28 9:15 [PATCH] USB speedtouch: be firm when disconnected Duncan Sands
@ 2003-02-28 21:32 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-02-28 21:32 UTC (permalink / raw)
To: Duncan Sands; +Cc: linux-usb-devel, linux-kernel
On Fri, Feb 28, 2003 at 10:15:37AM +0100, Duncan Sands wrote:
> Just say -ENODEV
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-28 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-28 9:15 [PATCH] USB speedtouch: be firm when disconnected Duncan Sands
2003-02-28 21:32 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox