summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Hilman (TI) <khilman@baylibre.com>2026-07-06 11:43:00 -0700
committerKevin Hilman (TI) <khilman@baylibre.com>2026-07-06 11:43:00 -0700
commitba251bb5ce2db9228a4c1ca9aef787c368121af7 (patch)
tree65cb09d63c45f56b492948b406433422e1764bd3
parented3d1adfe1534c104ef054253a1091016ea347ee (diff)
parent6342de0aed216b6df460b492ddb532b3e0ed16f1 (diff)
downloadlinux-next-ba251bb5ce2db9228a4c1ca9aef787c368121af7.tar.gz
linux-next-ba251bb5ce2db9228a4c1ca9aef787c368121af7.zip
Merge branch 'omap-for-v7.3/drivers' into tmp/omap-next-20260706.114259
-rw-r--r--drivers/bus/ti-sysc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index a5b9507de37c..e118b900c9ac 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -682,6 +682,7 @@ static struct device_node *stdout_path;
static void sysc_init_stdout_path(struct sysc *ddata)
{
+ struct device_node *chosen;
struct device_node *np = NULL;
const char *uart;
@@ -691,15 +692,18 @@ static void sysc_init_stdout_path(struct sysc *ddata)
if (stdout_path)
return;
- np = of_find_node_by_path("/chosen");
- if (!np)
+ chosen = of_find_node_by_path("/chosen");
+ if (!chosen)
goto err;
- uart = of_get_property(np, "stdout-path", NULL);
- if (!uart)
+ uart = of_get_property(chosen, "stdout-path", NULL);
+ if (!uart) {
+ of_node_put(chosen);
goto err;
+ }
np = of_find_node_by_path(uart);
+ of_node_put(chosen);
if (!np)
goto err;