]> git.baikalelectronics.ru Git - kernel.git/commit
WAN: HDLC: Detach protocol before unregistering device
authorAndrew Lunn <andrew@lunn.ch>
Thu, 3 Dec 2015 20:12:30 +0000 (21:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Dec 2015 22:41:41 +0000 (17:41 -0500)
commitf833f7b1b5b0fde9993ad687076c4dd2285f316c
tree23336a0f75b206749b712905cf3198b9867a1fdc
parent6bf4bf5ed2e17e594890d3b91b1dd6f02b37238f
WAN: HDLC: Detach protocol before unregistering device

The current code first unregisters the device, and then detaches the
protocol from it. This should be performed the other way around, since
the detach may try to use state which has been freed by the
unregister. Swap the order, so that we first detach and then remove the
netdev.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/hdlc.c