[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 <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- commit f58f97fa9d258e4110ee1257a63cd1af51787f69 tree 5332c491dcfb3ca5ba457ad48c8e559713efeae3 parent a3c900bb8cbacfecf0be51313e43f330663266a1 author Colin Leroy <[EMAIL PROTECTED]> Sun, 01 May 2005 11:29:10 +0200 committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Mon, 27 Jun 2005 14:43:47 -0700 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 --- a/drivers/usb/net/zd1201.c +++ b/drivers/usb/net/zd1201.c @@ -1905,6 +1905,9 @@ static int zd1201_resume(struct usb_inte { struct zd1201 *zd = usb_get_intfdata(interface); + if (!zd || !zd->dev) + return -ENODEV; + netif_device_attach(zd->dev); if (zd->was_enabled) ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel