mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
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 <johan@kernel.org> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patch.msgid.link/20250926142454.5929-3-johan@kernel.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
This commit is contained in:
committed by
Neil Armstrong
parent
32200f4828
commit
075daf2264
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user