]> git.baikalelectronics.ru Git - uboot.git/commit
test/dm: check if devices exist
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 16 Jul 2020 22:20:14 +0000 (00:20 +0200)
committerSimon Glass <sjg@chromium.org>
Mon, 20 Jul 2020 17:37:47 +0000 (11:37 -0600)
commit65d1f7c238f28a4ee4d5fb28563789bc7b7b674b
tree932ac4bf61bf50e484bb2c345899a275d39591d1
parent788475ec931bd8a8f326bf3ca7b408ab67b89a85
test/dm: check if devices exist

Running 'ut dm' on the sandbox without -D or -d results in segmentation
faults due to NULL pointer dereferences.

Check that device pointers are non-NULL before using them.

Use ut_assertnonnull() for pointers instead of ut_assert().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Philippe Reynes <philippe.reynes@softathome.com>
test/dm/acpi.c
test/dm/core.c
test/dm/devres.c
test/dm/test-fdt.c
test/dm/virtio.c