qcacld-3.0: Apps crash due to invalid wiphy check during unload

Wiphy is not getting unregister at the time of unload because of
that kernel has stale pointer which is causing a crash.

Add a proper check for wiphy during unload and unregister the wiphy.

Change-Id: Ibbdc3966f37bc628552c0118297f82065fa04d46
CRs-Fixed: 2027470
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 37fbe27..282c213 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5417,7 +5417,7 @@
 	 * If there is re_init failure wiphy would have already de-registered
 	 * check the wiphy status before un-registering again
 	 */
-	if (!wiphy && wiphy->registered) {
+	if (wiphy && wiphy->registered) {
 		wiphy_unregister(wiphy);
 		wlan_hdd_cfg80211_deinit(wiphy);
 		hdd_lpass_notify_stop(hdd_ctx);