usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared
authorEugene Shatokhin <eugene.shatokhin@rosalab.ru>
Mon, 24 Aug 2015 20:13:42 +0000 (23:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2015 02:44:13 +0000 (19:44 -0700)
commitf50791ac1aca1ac1b0370d62397b43e9f831421a
tree5abf5300a97557eec74051c5043b24468a51a8cd
parentccc02ddb1bb7c0c1cac695db18f7533296b51ecc
usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

It is needed to check EVENT_NO_RUNTIME_PM bit of dev->flags in
usbnet_stop(), but its value should be read before it is cleared
when dev->flags is set to 0.

The problem was spotted and the fix was provided by
Oliver Neukum <oneukum@suse.de>.

Signed-off-by: Eugene Shatokhin <eugene.shatokhin@rosalab.ru>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c