From 0bac486011e05c3c76d3e0419ca4aaea4b43c5f2 Mon Sep 17 00:00:00 2001 From: Radoslaw Czerski Date: Fri, 1 Apr 2016 11:11:00 +0200 Subject: module/information/alarm: Bugfix. Unnecessary 'if' block removed. Change-Id: I3796cbfc1996842b88d3e2b0d061ce2a015abf8c Signed-off-by: Radoslaw Czerski --- src/modules/information/alarm.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/modules/information/alarm.c b/src/modules/information/alarm.c index e37b74b..cd4cb79 100644 --- a/src/modules/information/alarm.c +++ b/src/modules/information/alarm.c @@ -148,14 +148,10 @@ static int register_alarm_module(void *data) retvm_if(data == NULL, FAIL, "Invalid parameter!"); set_app_state(data); - if (ret < 0) - { - _E("Fail to init alarmdb."); - return FAIL; - } - ret = vconf_notify_key_changed(VCONFKEY_ALARM_STATE, - indicator_alarm_change_cb, data); + ret = vconf_notify_key_changed(VCONFKEY_ALARM_STATE, indicator_alarm_change_cb, data); + + retvm_if(ret != 0, FAIL, "vconf_notify_key_changed failed[%d]", ret); indicator_alarm_change_cb(NULL, data); @@ -168,8 +164,7 @@ static int unregister_alarm_module(void) { int ret; - ret = vconf_ignore_key_changed(VCONFKEY_ALARM_STATE, - indicator_alarm_change_cb); + ret = vconf_ignore_key_changed(VCONFKEY_ALARM_STATE, indicator_alarm_change_cb); return ret; } -- cgit v1.2.3