diff options
author | Burt P <pburt0@gmail.com> | 2017-07-25 14:33:49 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2017-07-25 19:02:32 -0700 |
commit | 81ae37c58709cf1396b09e5136acfc8a0c259476 (patch) | |
tree | f3e502ab9841dd0b1815ef4848d226cba87037ab /modules/devices/ia64 | |
parent | 8e4746423c20b525671998b1bc94b3b6d8ec78d6 (diff) |
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 <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/ia64')
-rw-r--r-- | modules/devices/ia64/processor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/devices/ia64/processor.c b/modules/devices/ia64/processor.c index cbe1bc2e..c617f096 100644 --- a/modules/devices/ia64/processor.c +++ b/modules/devices/ia64/processor.c @@ -105,12 +105,12 @@ processor_scan(void) processor = (Processor *) pi->data; /* strings can't be null or segfault later */ - STRIFNULL(model_name, _("IA64 Processor") ); - UNKIFNULL(vendor_id); - STRIFNULL(arch, "IA-64"); - STRIFNULL(archrev, "0"); - UNKIFNULL(family); - UNKIFNULL(features); + STRIFNULL(processor->model_name, _("IA64 Processor") ); + UNKIFNULL(processor->vendor_id); + STRIFNULL(processor->arch, "IA-64"); + STRIFNULL(processor->archrev, "0"); + UNKIFNULL(processor->family); + UNKIFNULL(processor->features); /* topo & freq */ processor->cpufreq = cpufreq_new(processor->id); |