powerpc/powermac: Simplify bootx_scan_dt_build_struct()

Assign the empty string directly instead of NULL checking namep again.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260720231453.117271-2-thorsten.blum@linux.dev
This commit is contained in:
Thorsten Blum 2026-07-21 01:14:52 +02:00 committed by Madhavan Srinivasan
parent 6050e3196d
commit a2144b13a6

View File

@ -284,9 +284,7 @@ static void __init bootx_scan_dt_build_struct(unsigned long base,
dt_push_token(OF_DT_BEGIN_NODE, mem_end);
/* get the node's full name */
namep = np->full_name ? (char *)(base + np->full_name) : NULL;
if (namep == NULL)
namep = "";
namep = np->full_name ? (char *)(base + np->full_name) : "";
l = strlen(namep);
DBG("* struct: %s\n", namep);