提交 f58f97fa 编写于 作者: C Colin Leroy 提交者: Greg Kroah-Hartman

[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: NColin Leroy <colin@colino.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a3c900bb
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册