]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: avoid NULL dereference in lists_bind_fdt()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 11 Jul 2022 06:21:31 +0000 (08:21 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 26 Jul 2022 08:30:56 +0000 (02:30 -0600)
commit7a6f5a4ea119441cb114b4239862f042501a6e5e
tree9621dc3ced6977d876c7a7fb631d52099c808dd0
parent59ec024e563c9faab52f1c86736102562201c5fc
dm: avoid NULL dereference in lists_bind_fdt()

If parameter drv of lists_bind_fdt() is specified, we want to bind to this
specific driver even if its field of_match is NULL.

If entry->of_match is NULL, we should not dereference it in a debug
statement.

Fixes: d3e773613b6d ("dm: core: Use U-Boot logging instead of pr_debug()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/lists.c