tools/cpu/nios2/memory.c: Fix uninitialized use of variable memory

Updates #2405.
This commit is contained in:
Martin Galvan
2015-09-02 16:54:22 -05:00
committed by Joel Sherrill
parent d781ad5086
commit 1491f6948e

View File

@@ -18,7 +18,8 @@ memory_desc *find_memory(device_desc *devices)
{
struct ptf *p;
struct ptf_item pi;
memory_desc *tmd, *memory;
memory_desc *tmd;
memory_desc *memory = NULL;
/********************************************************/
/* Check which of the devices are memory, sort by size */
@@ -29,8 +30,6 @@ memory_desc *find_memory(device_desc *devices)
struct ptf_item pi;
device_desc *dd;
memory = NULL;
for(dd = devices; dd; dd=dd->next)
{
p = ptf_find(dd->ptf->sub, &pi, item, "Is_Memory_Device", "1");