int enum_size = sizeof(power_locks) / sizeof(power_locks[0]);
int enum_counter = 0;
+ if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
+ return 0;
+
for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
{
// Target API
int nRet = device_power_request_lock(power_locks[enum_counter], 10);
- if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
- {
- assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
- }
- else if ( nRet != DEVICE_ERROR_NONE )
+ if ( nRet != DEVICE_ERROR_NONE )
{
FPRINTF("[Line : %d][%s] device_power_request_lock failed for enum = %s, error returned = %s\\n",
__LINE__, API_NAMESPACE, DeviceGetPowerLock(power_locks[enum_counter]), DeviceGetError(nRet));
// Target API
nRet = device_power_release_lock(power_locks[enum_counter]);
- if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
- {
- assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
- }
- else if ( nRet != DEVICE_ERROR_NONE )
+ if ( nRet != DEVICE_ERROR_NONE )
{
FPRINTF("[Line : %d][%s] device_power_release_lock failed for enum = %s, error returned = %s\\n",
__LINE__, API_NAMESPACE, DeviceGetPowerLock(power_locks[enum_counter]), DeviceGetError(nRet));