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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2015 10:07:37 +0000 (12:07 +0200)
commitfe474009a2167693c1a1cc2f396cb20621770450
treed580ef9a39c1d19ad52b40d93b8e8cb73ca361c7
parent6d8c190531d0020870b93eee6a3933cb39fb1f52
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