]> git.baikalelectronics.ru Git - uboot.git/commit
x86: Correct error return value in mrccache_get_region()
authorSimon Glass <sjg@chromium.org>
Sun, 2 Feb 2020 20:37:06 +0000 (13:37 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 5 Mar 2020 10:19:04 +0000 (18:19 +0800)
commit72fa7238b063a7990078aa2f8cc3445b8ca8ed66
treec4c25136b7bd53d77e81d0317bdac57b2aebc41f
parenteefe5a324f4f700f1d36e4bc34d2bae860f8018b
x86: Correct error return value in mrccache_get_region()

This function doesn't use uclass_find_first_device() correctly. Add a
check that the device is found so we don't try to read properties from a
NULL device.

The fixes booting on minnoxmax.

Fixes: 8f172af47d3 ("x86: Adjust mrccache_get_region() to use livetree")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/mrccache.c