projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3c900b
)
[PATCH] USB: check for device in zd1201_resume
author
Colin Leroy
<colin@colino.net>
Sun, 1 May 2005 09:29:10 +0000
(11:29 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 27 Jun 2005 21:43:47 +0000
(14:43 -0700)
My patch adding PM support for zd1201 didn't check for the device on
resume, which can oops if the device has been removed.
This patch fixes it.
Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/zd1201.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/net/zd1201.c
b/drivers/usb/net/zd1201.c
index eb0bff535b3cfddbeaea0f861b2f16146ca622d8..3b387b005739150dc0de494f726a917b2d2981d0 100644
(file)
--- a/
drivers/usb/net/zd1201.c
+++ b/
drivers/usb/net/zd1201.c
@@
-1905,6
+1905,9
@@
static int zd1201_resume(struct usb_interface *interface)
{
struct zd1201 *zd = usb_get_intfdata(interface);
+ if (!zd || !zd->dev)
+ return -ENODEV;
+
netif_device_attach(zd->dev);
if (zd->was_enabled)