diff options
Diffstat (limited to 'lib/fdtdec.c')
| -rw-r--r-- | lib/fdtdec.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 125d9dbf263..38a0cff25ee 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1309,7 +1309,8 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename,  		}  		if (addr == carveout->start && (addr + size) == carveout->end) { -			*phandlep = fdt_get_phandle(blob, node); +			if (phandlep) +				*phandlep = fdt_get_phandle(blob, node);  			return 0;  		}  	} | 
