hal: fix misc audio hal errors

Fix misc audio hal errors.

CRs-Fixed: 2436822
Change-Id: I078656c5a7a3a5a97c8044e716c5ca0fe8ff3ef4
diff --git a/hal/ahal_config_helper.cpp b/hal/ahal_config_helper.cpp
index 9bdd785..753d8a8 100644
--- a/hal/ahal_config_helper.cpp
+++ b/hal/ahal_config_helper.cpp
@@ -62,8 +62,8 @@
                      dlsym(handle, "getAudioHalExtConfigs");
         if (!getAHalConfigs) {
             ALOGE("%s: Could not find symbol: %s", __FUNCTION__, dlerror());
-            handle = nullptr;
             dlclose(handle);
+            handle = nullptr;
         }
     }