logger: Do not disable Android logging completely if pti_init fails
authorJouni Hogander <jouni.hogander@intel.com>
Tue, 22 May 2012 10:47:07 +0000 (13:47 +0300)
committerbuildbot <buildbot@intel.com>
Tue, 22 May 2012 18:11:32 +0000 (11:11 -0700)
BZ: 37726

Currently logger_init exits and android logging is not initialized at
all if init_pti fails. This doesn't make sense as pti is not needed by
Android logging.

Fix this by just printing out error message when failure happens
instead of stopping the initialization.

Change-Id: I51432e414659750f780d626833b8862c82544ce7
Signed-off-by: Jouni Hogander <jouni.hogander@intel.com>
Reviewed-on: http://android.intel.com:8080/49699
Reviewed-by: Guerard, Christophe <christophe.guerard@intel.com>
Reviewed-by: Lebouc, Christophe <christophe.lebouc@intel.com>
Tested-by: Lebouc, Christophe <christophe.lebouc@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/android/logger.c

index 8a51812..1356061 100755 (executable)
@@ -736,7 +736,8 @@ static int __init logger_init(void)
                        goto out;
                ret = init_pti(log_list[i]);
                if (unlikely(ret))
-                       goto out;
+                       printk(KERN_ERR "logger: failed to init pti for %s, ignoring\n",
+                              log_list[i]->misc.name);
        }
 
        ret = init_log_kernel_bottom();