PD#TV-2272
Problem:
can't get corrent reboot reason in system panic
Solution:
get corrent reboot reason in system panic
Verify:
test pass on T962x2_x301
Change-Id: If0fc95c2807d89542b4ccbc8e3709be20f17b03b
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
}
ret = register_die_notifier(&panic_notifier);
- return ret;
+ if (ret != 0) {
+ pr_err("%s,register die notifier failed,ret =%d!\n",
+ __func__, ret);
+ return ret;
+ }
+
+ /* Register a call for panic conditions. */
+ ret = atomic_notifier_chain_register(&panic_notifier_list,
+ &panic_notifier);
+ if (ret != 0) {
+ pr_err("%s,register panic notifier failed,ret =%d!\n",
+ __func__, ret);
+ return ret;
+ }
+ return 0;
}
static const struct of_device_id of_aml_restart_match[] = {