board: rzg2l: Check the DTB pointer passed by the TF-A.
authorMathieu Othacehe <othacehe@gnu.org>
Mon, 22 Sep 2025 16:29:00 +0000 (18:29 +0200)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 25 Sep 2025 21:18:34 +0000 (23:18 +0200)
commit9c7e61fccc65974fc970c587bddcd5857b334852
treee6585acba71375ad573f671d9ffbf39a90d7565d
parentf53fe908ac3dd44f7ad63dff319636541710b98c
board: rzg2l: Check the DTB pointer passed by the TF-A.

On the RZG2L platform, the advised
TF-A (https://github.com/renesas-rz/rzg_trusted-firmware-a/tree/v2.5/rzg2l)
does not pass any DTB blob to U-Boot.

On the other hand, the RZG2L part of U-Boot expects a DTB to be passed.  It
means that if one flashes the latest TF-A as well as the mainline U-Boot,
it will crash trying to dereference the NULL DTB pointer before outputing
anything.

Check if the DTB pointer is NULL before trying to use it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
arch/arm/mach-renesas/cpu_info-rzg2l.c
board/renesas/rzg2l/rzg2l.c