Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fcc286f authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

of: earlycon: Log more helpful message if stdout-path node not found



Earlycon may fail to initialize for a variety of reasons, most of
which log the default early param message. If the stdout-path node is
not found, log the path which was not found (and suppress the
default early param message).

Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc6b576b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -820,11 +820,14 @@ static int __init early_init_dt_scan_chosen_serial(void)
	q = strchrnul(p, ':');
	if (*q != '\0')
		options = q + 1;
	l = q - p;

	/* Get the node specified by stdout-path */
	offset = fdt_path_offset_namelen(fdt, p, q - p);
	if (offset < 0)
		return -ENODEV;
	offset = fdt_path_offset_namelen(fdt, p, l);
	if (offset < 0) {
		pr_warn("earlycon: stdout-path %.*s not found\n", l, p);
		return 0;
	}

	for (match = __earlycon_table; match < __earlycon_table_end; match++) {
		if (!match->compatible[0])