diff options
author | Colin Leroy <colin@colino.net> | 2005-05-01 05:29:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-27 17:43:47 -0400 |
commit | f58f97fa9d258e4110ee1257a63cd1af51787f69 (patch) | |
tree | 5332c491dcfb3ca5ba457ad48c8e559713efeae3 /drivers/usb/net/zd1201.c | |
parent | a3c900bb8cbacfecf0be51313e43f330663266a1 (diff) |
[PATCH] USB: check for device in zd1201_resume
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>
Diffstat (limited to 'drivers/usb/net/zd1201.c')
-rw-r--r-- | drivers/usb/net/zd1201.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c index eb0bff535b3c..3b387b005739 100644 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c | |||
@@ -1905,6 +1905,9 @@ static int zd1201_resume(struct usb_interface *interface) | |||
1905 | { | 1905 | { |
1906 | struct zd1201 *zd = usb_get_intfdata(interface); | 1906 | struct zd1201 *zd = usb_get_intfdata(interface); |
1907 | 1907 | ||
1908 | if (!zd || !zd->dev) | ||
1909 | return -ENODEV; | ||
1910 | |||
1908 | netif_device_attach(zd->dev); | 1911 | netif_device_attach(zd->dev); |
1909 | 1912 | ||
1910 | if (zd->was_enabled) | 1913 | if (zd->was_enabled) |