soc: amlogic: canvas: simplify lookup error handling

Simplify the canvas lookup error handling by dropping the OF node
reference sooner.

Signed-off-by: Johan Hovold <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
This commit is contained in:
Johan Hovold authored and Neil Armstrong committed 2025-10-21 14:20:29 +02:00
1 parent 32200f4828
commit 075daf2264
1 file changed
+2 -5
+2 -5
View File
@@ -60,12 +60,9 @@ struct meson_canvas *meson_canvas_get(struct device *dev)
return ERR_PTR(-ENODEV);
canvas_pdev = of_find_device_by_node(canvas_node);
if (!canvas_pdev) {
of_node_put(canvas_node);
return ERR_PTR(-EPROBE_DEFER);
}
of_node_put(canvas_node);
if (!canvas_pdev)
return ERR_PTR(-EPROBE_DEFER);
/*
* If priv is NULL, it's probably because the canvas hasn't