Fix thread deadlock issue - Removed the dependency

Root Cause: The function returned without release the thread lock while
the input parameter is an invalid value.

Change-Id: I999a0824a147bda85039c4ad02bfbf82a6aa093c
(cherry picked from commit fee6d6550e17b87b4d9b0454432ad83c7decd3ac)