armv8/fsl-lsch3: fdt: Check the pointer returned from call to a function may be NULL
authorAlison Wang <b18965@freescale.com>
Tue, 1 Sep 2015 02:47:27 +0000 (10:47 +0800)
committerYork Sun <yorksun@freescale.com>
Mon, 26 Oct 2015 16:09:55 +0000 (09:09 -0700)
commit6a00a9cb1536c5a19269d539642fb1cced0b5a9f
tree52331d0d0a2295f30c4656ca34b5a8e5afe4aa2e
parentda77c819903be2c179f67b37f9285ce39ebd3c5d
armv8/fsl-lsch3: fdt: Check the pointer returned from call to a function may be NULL

Pointer 'reg' returned from call to function 'fdt_getprop' may be
NULL, will be passed to function and may be dereferenced there by
passing argument 1 to function 'of_read_number'. So check pointer
'reg' first.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/arm/cpu/armv8/fsl-lsch3/fdt.c