mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01: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 <[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:
1 parent
32200f4828
commit
075daf2264
1 file changed
+2
-5
@@ -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