_I("Start Power managing without noti");
if (power_ops.get_power_lock_support()) {
broadcast_pm_wakeup();
- power_ops.power_lock();
+ power_ops.power_lock();
}
pm_cur_state = S_NORMAL;
- vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ ret = vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ if (ret < 0)
+ _E("Failed to set vconf value for pm cur state: %d", vconf_get_ext_errno());
status = DEVICE_OPS_STATUS_START;
if (display_conf.timeout_enable) {
power_ops.power_lock();
}
pm_cur_state = S_NORMAL;
- vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ ret = vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ if (ret < 0)
+ _E("Failed to set vconf value for pm cur state: %d", vconf_get_ext_errno());
status = DEVICE_OPS_STATUS_START;
if (display_conf.timeout_enable) {
power_ops.power_lock();
}
pm_cur_state = S_NORMAL;
- vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ ret = vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ if (ret < 0)
+ _E("Failed to set vconf value for pm cur state: %d", vconf_get_ext_errno());
status = DEVICE_OPS_STATUS_START;
if (display_conf.timeout_enable) {
power_ops.power_lock();
}
pm_cur_state = S_NORMAL;
- vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ ret = vconf_set_int(VCONFKEY_PM_STATE, pm_cur_state);
+ if (ret < 0)
+ _E("Failed to set vconf value for pm cur state: %d", vconf_get_ext_errno());
status = DEVICE_OPS_STATUS_START;
if (display_conf.timeout_enable) {
if (val != SIM_CARD_NOT_PRESENT) {
state = true;
- vconf_set_bool(VCONFKEY_LCD_BRIGHTNESS_INIT, state);
- vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, PM_DEFAULT_BRIGHTNESS);
+ ret = vconf_set_bool(VCONFKEY_LCD_BRIGHTNESS_INIT, state);
+ if (ret < 0)
+ _E("Failed to set vconf value for lcd brightness: %d", vconf_get_ext_errno());
+ ret = vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, PM_DEFAULT_BRIGHTNESS);
+ if (ret < 0)
+ _E("Failed to set vconf value for lcd brightness: %d", vconf_get_ext_errno());
backlight_ops.set_brightness(PM_DEFAULT_BRIGHTNESS);
_I("SIM card is inserted at first.");
}
size = g_variant_iter_n_children(iter);
freq_pattern = (int*)malloc(sizeof(int) * size);
+ if (!freq_pattern) {
+ ret = -ENOMEM;
+ goto exit;
+ }
while (g_variant_iter_next(iter, "i", &freq_pattern[i++]))
;
ret = ir_dev->transmit(freq_pattern, size);
exit:
- free(freq_pattern);
+ if (freq_pattern)
+ free(freq_pattern);
return g_variant_new("(i)", ret);
}