aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/sh
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-25 14:33:49 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2017-07-25 19:02:32 -0700
commit81ae37c58709cf1396b09e5136acfc8a0c259476 (patch)
treef3e502ab9841dd0b1815ef4848d226cba87037ab /modules/devices/sh
parent8e4746423c20b525671998b1bc94b3b6d8ec78d6 (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/sh')
-rw-r--r--modules/devices/sh/processor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/devices/sh/processor.c b/modules/devices/sh/processor.c
index b1f0e5d6..05a90191 100644
--- a/modules/devices/sh/processor.c
+++ b/modules/devices/sh/processor.c
@@ -52,8 +52,8 @@ processor_scan(void)
fclose(cpuinfo);
- STRIFNULL(model_name, _("SuperH Processor"));
- UNKIFNULL(vendor_id);
+ STRIFNULL(processor->model_name, _("SuperH Processor"));
+ UNKIFNULL(processor->vendor_id);
return g_slist_append(NULL, processor);
}