Klocwork: add invalid pointer sanity check

Signed-off-by: Wind Yuan <feng.yuan@intel.com>
diff --git a/tests/test-device-manager.cpp b/tests/test-device-manager.cpp
index 61181f4..fd2c291 100644
--- a/tests/test-device-manager.cpp
+++ b/tests/test-device-manager.cpp
@@ -178,6 +178,7 @@
 
     if (!_file) {
         XCAM_LOG_ERROR ("open file failed");
+        return;
     }
 
     if (fwrite (frame, size, 1, _file) <= 0) {