{
// Target API
int nRet = device_power_request_lock(power_locks[enum_counter], 10);
- if ((bIsDisplayFeatureSupported == false) ||
- (bIsDisplayStateFeatureSupported == false))
+ if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
{
- if ((power_locks[enum_counter] == POWER_LOCK_DISPLAY) ||
- (power_locks[enum_counter] == POWER_LOCK_DISPLAY_DIM))
- {
- assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
- return 0;
- }
- else if (power_locks[enum_counter] == POWER_LOCK_CPU)
- {
- assert_eq(nRet, DEVICE_ERROR_NONE);
- return 0;
- }
+ assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
}
-
- if ( nRet != DEVICE_ERROR_NONE )
+ else 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))
+ if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
{
- if ((power_locks[enum_counter] == POWER_LOCK_DISPLAY) ||
- (power_locks[enum_counter] == POWER_LOCK_DISPLAY_DIM))
- {
- assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
- return 0;
- }
- else if (power_locks[enum_counter] == POWER_LOCK_CPU)
- {
- assert_eq(nRet, DEVICE_ERROR_NONE);
- return 0;
- }
+ assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
}
-
- if ( nRet != DEVICE_ERROR_NONE )
+ else 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));