]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: avoid NULL dereference in add_item()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 10 Jul 2022 13:40:22 +0000 (15:40 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 26 Jul 2022 08:30:56 +0000 (02:30 -0600)
commit53fbaa4a4ae1dde1f83b2dda39ccf70a0b69373d
treebff27ae5e9e4b1ceb7f550e29274f13ca2b546e2
parent6e15cda270a060cf87c6c643a1cc3da65ffb242d
dm: avoid NULL dereference in add_item()

acpi_add_other_item() passes dev = NULL. Instead of dev->name write the
string "other" to the debug log:

    ACPI: Writing ACPI tables at 1fd3000
    0base: writing table '<NULL>'
    * other: Added type 3, 0000000011fd4000, size 240
    1facs: writing table 'FACS'
    * other: Added type 3, 0000000011fd4240, size 40
    5csrt: writing table 'CSRT'
    * other: Added type 3, 0000000011fd4280, size 30

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/acpi.c