From a8307c5c40de0d5752878f14035151d50a79a6c1 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Sun, 24 Jan 2021 12:17:26 +0100 Subject: [PATCH] dev_tree: Fix null pointer dereference if model is not defined --- platform/msm_shared/dev_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/msm_shared/dev_tree.c b/platform/msm_shared/dev_tree.c index 2dd1ff624..9af15e8ee 100755 --- a/platform/msm_shared/dev_tree.c +++ b/platform/msm_shared/dev_tree.c @@ -230,7 +230,7 @@ static int dev_tree_compatible(void *dtb, uint32_t dtb_size, struct dt_entry_nod cur_dt_entry->size = dtb_size; dprintf(SPEW, "Found an appended flattened device tree (%s - %u %u 0x%x)\n", - *model ? model : "unknown", + model ? model : "unknown", cur_dt_entry->platform_id, cur_dt_entry->variant_id, cur_dt_entry->soc_rev); if (platform_dt_absolute_match(cur_dt_entry, dtb_list)) { @@ -390,7 +390,7 @@ static int dev_tree_compatible(void *dtb, uint32_t dtb_size, struct dt_entry_nod for (i=0 ;i < num_entries; i++) { dprintf(SPEW, "Found an appended flattened device tree (%s - %u %u %u 0x%x)\n", - *model ? model : "unknown", + model ? model : "unknown", dt_entry_array[i].platform_id, dt_entry_array[i].variant_id, dt_entry_array[i].board_hw_subtype, dt_entry_array[i].soc_rev); if (platform_dt_absolute_match(&(dt_entry_array[i]), dtb_list)) {