usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared
commit26b732f035763e44a777a213e35c272f5ca41430
authorEugene Shatokhin <eugene.shatokhin@rosalab.ru>
Mon, 24 Aug 2015 20:13:42 +0000 (24 23:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Oct 2015 11:49:13 +0000 (3 13:49 +0200)
treeae68e842d2a8c5653f8f1bd96d10213184720e03
parent5184fc66fd660f675ed5662cc4288fedc579e222
usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

[ Upstream commit f50791ac1aca1ac1b0370d62397b43e9f831421a ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/usbnet.c