author | Jianxin Pan <jianxin.pan@amlogic.com> | 2019-05-14 06:00:03 (GMT) |
---|---|---|
committer | Jianxin Pan <jianxin.pan@amlogic.com> | 2019-05-14 06:45:38 (GMT) |
commit | 59ab3a0599525ce86d4d7b70d0b3279f802edfb6 (patch) | |
tree | 2ca6cb6dc52a4a97d6ed392bf6319a388b93f516 | |
parent | 75a8a664e948256d5fec550bfc412b4b61d9f747 (diff) | |
download | common-59ab3a0599525ce86d4d7b70d0b3279f802edfb6.zip common-59ab3a0599525ce86d4d7b70d0b3279f802edfb6.tar.gz common-59ab3a0599525ce86d4d7b70d0b3279f802edfb6.tar.bz2 |
debug: do not print old_size when ftrace_size is 0 [1/1]
PD#SWPL-6028
Problem:
do not print old_size when ftrace_size is 0
Solution:
do not print old_size when ftrace_size is 0
Verify:
TL1 x301
Change-Id: I00a71c83fede14a2606c5e7eea5d8c4fdaeb5553
Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
-rw-r--r-- | fs/pstore/ram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index aa3f123..c2d8f06 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -688,8 +688,8 @@ static int ramoops_probe(struct platform_device *pdev) } pr_info("ramoops_io_en:%d %d old:0x%lx ftrace_size:0x%lx", ramoops_io_en, ramoops_ftrace_en, - (unsigned long)persistent_ram_old_size(cxt->fprz), - ramoops_ftrace_size); + cxt->fprz ? (unsigned long)persistent_ram_old_size(cxt->fprz) + : 0, ramoops_ftrace_size); #endif return 0; |