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/sh/processor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/devices/sh/processor.c') 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); } -- cgit v1.2.3