batman-adv: use unregister_netdevice() when softif_create fails
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Mon, 7 Nov 2011 12:57:48 +0000 (13:57 +0100)
committerSven Eckelmann <sven@narfation.org>
Sun, 20 Nov 2011 12:08:37 +0000 (13:08 +0100)
When entering softif_create(), the rtnl lock has already been acquired
by store_mesh_iface().
(store_mesh_iface() -> hardif_enable_interface() -> softif_create)

In case of an error, we should therefore call unregister_netdevice()
instead of unregister_netdev().

unregister_netdev() tries to acquire the rtnl lock itself and deadlocks
in this situation. unregister_netdevice() assumes that the rtnl lock
is already been held.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>

No differences found