From 81ae37c58709cf1396b09e5136acfc8a0c259476 Mon Sep 17 00:00:00 2001 From: Burt P Date: Tue, 25 Jul 2017 14:33:49 -0500 Subject: device tree: fix crash when device tree is not found * check if device tree was found before add_keys() * UNKIFNULL(model) before strcmp * make UNKIFNULL() STRIFNULL() EMPIFNULL() macros more generic Signed-off-by: Burt P --- modules/devices/s390/processor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/devices/s390') diff --git a/modules/devices/s390/processor.c b/modules/devices/s390/processor.c index 9a9b789b..b075a53c 100644 --- a/modules/devices/s390/processor.c +++ b/modules/devices/s390/processor.c @@ -89,8 +89,8 @@ processor_scan(void) processor = (Processor *) pi->data; /* strings can't be null or segfault later */ - STRIFNULL(model_name, _("S390 Processor") ); - UNKIFNULL(proc_str); + STRIFNULL(processor->model_name, _("S390 Processor") ); + UNKIFNULL(processor->proc_str); /* topo & freq */ processor->cpufreq = cpufreq_new(processor->id); -- cgit v1.2.3