From 59ab3a0599525ce86d4d7b70d0b3279f802edfb6 Mon Sep 17 00:00:00 2001 From: Jianxin Pan Date: Tue, 14 May 2019 14:00:03 +0800 Subject: [PATCH] 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 --- fs/pstore/ram.c | 4 ++-- 1 file 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; -- 2.7.4