qcacld-3.0: Check the netdev validity before deferencing it

If the netdevice registration fails, the netdevice is freed
by referencing the context in the adapter structure.
However, in some scenarios the registration failure can result
in the netdev ops uninit being called where the reference is
reset and hence invalid.

Fix this by saving the netdevice in a local variable

Change-Id: Id01bf5d3fe633432695520bda77697842ced9ff1
CRs-Fixed: 2423508
1 file changed