of: base: Fix of_get_stdoutpath() when property does not contain a colon
PATCH 1/1 of: base: Fix of_get_stdoutpath() when property does not contain a colon
Initial state of patch accounted for lack of colon by skipping xstrdup in that case. Too much time went by that I forgot before upstreaming,
why I did it that way and thus value ended up being dropped... Fix this to restore console for devices which lack : in their stdout-path.
Fixes 90f70dbe2958 ("of: split part of of_get_stdoutpath into of_find_node_by_chosen")
Signed-off-by Ahmad Fatoum <[email protected]>
--- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/of/base.c +2 -2
@@ -2689,9 +2689,9 @@ struct device_node *of_find_node_by_chosen(const char *propname, p =strchrnul (value,':' );if (*p) - buf =xstrndup (value, p - value); + value = buf =xstrndup (value, p - value); - dn =of_find_node_by_path_or_alias (NULL , buf); + dn =of_find_node_by_path_or_alias (NULL , value);free (buf);
Signature · 1 line
2.38.3