]> git.baikalelectronics.ru Git - uboot.git/commit
dm: core: Fix iteration over driver_info records
authorPaul Barker <paul.barker@sancloud.com>
Mon, 14 Nov 2022 12:42:35 +0000 (12:42 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 2 Dec 2022 13:39:00 +0000 (08:39 -0500)
commit1d578a3ad2a8aeeded216edf038fe0101532d4cf
tree3ecc7b5b7dc2980df370d6ec2b6473dc1bf3fe7c
parent190a1daa30867e07cf3f6119855c9cc2c39b343f
dm: core: Fix iteration over driver_info records

We should only perform additional iteration steps when needed to
initialize the parent of a device. Other binding errors (such as a
missing driver) should not lead to additional iteration steps.

Unnecessary iteration steps can cause issues when memory is tightly
constrained (such as in the TPL/SPL) since device_bind_by_name()
unconditionally allocates memory for a struct udevice. On the SanCloud
BBE this led to boot failure caused by memory exhaustion in the SPL
when booting from SPI flash.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
drivers/core/lists.c