提交 fb13c47b 编写于 作者: M Ming Lei 提交者: David S. Miller

usbnet: clear OPEN flag in failure path

Without clearing OPEN flag in failure path, runtime or system resume
may submit interrupt/rx URB and start tx queue mistakenly on a
interface in DOWN state.
Signed-off-by: NMing Lei <ming.lei@canonical.com>
Acked-by: NOliver Neukum <oneukum@suse.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b9f90eb2
......@@ -796,11 +796,13 @@ int usbnet_open (struct net_device *net)
if (info->manage_power) {
retval = info->manage_power(dev, 1);
if (retval < 0)
goto done;
goto done_manage_power_error;
usb_autopm_put_interface(dev->intf);
}
return retval;
done_manage_power_error:
clear_bit(EVENT_DEV_OPEN, &dev->flags);
done:
usb_autopm_put_interface(dev->intf);
done_nopm:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册