Merge "soc: qcom: smem: Fix possible use of uninitialized variable"

This commit is contained in:
Linux Build Service Account 2017-01-19 19:10:35 -08:00 committed by Gerrit - the friendly Code Review server
commit 9c52d1de73

View file

@ -1222,12 +1222,18 @@ static void smem_init_security_partition(struct smem_toc_entry *entry,
LOG_ERR("Smem partition %d cached heap exceeds size\n", num); LOG_ERR("Smem partition %d cached heap exceeds size\n", num);
BUG(); BUG();
} }
if (hdr->host0 == SMEM_COMM_HOST && hdr->host1 == SMEM_COMM_HOST) { if (is_comm_partition) {
comm_partition.partition_num = num; if (hdr->host0 == SMEM_COMM_HOST
comm_partition.offset = entry->offset; && hdr->host1 == SMEM_COMM_HOST) {
comm_partition.size_cacheline = entry->size_cacheline; comm_partition.partition_num = num;
SMEM_INFO("Common Partition %d offset:%x\n", num, comm_partition.offset = entry->offset;
entry->offset); comm_partition.size_cacheline = entry->size_cacheline;
SMEM_INFO("Common Partition %d offset:%x\n", num,
entry->offset);
} else {
LOG_ERR("Smem Comm partition hosts don't match TOC\n");
WARN_ON(1);
}
return; return;
} }
if (hdr->host0 != SMEM_APPS && hdr->host1 != SMEM_APPS) { if (hdr->host0 != SMEM_APPS && hdr->host1 != SMEM_APPS) {