From colin@colino.net Sun May 1 02:35:45 2005 Date: Sun, 1 May 2005 11:29:10 +0200 From: Colin Leroy To: Greg KH Subject: 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 Signed-off-by: Greg Kroah-Hartman --- --- gregkh-2.6.orig/drivers/usb/net/zd1201.c 2005-05-02 15:23:11.000000000 -0700 +++ gregkh-2.6/drivers/usb/net/zd1201.c 2005-05-02 15:56:05.000000000 -0700 @@ -1905,6 +1905,9 @@ { struct zd1201 *zd = usb_get_intfdata(interface); + if (!zd || !zd->dev) + return -ENODEV; + netif_device_attach(zd->dev); if (zd->was_enabled)