Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Johan Hovold and committed by
Neil Armstrong
075daf22 32200f48

+2 -5
+2 -5
drivers/soc/amlogic/meson-canvas.c
··· 60 60 return ERR_PTR(-ENODEV); 61 61 62 62 canvas_pdev = of_find_device_by_node(canvas_node); 63 - if (!canvas_pdev) { 64 - of_node_put(canvas_node); 65 - return ERR_PTR(-EPROBE_DEFER); 66 - } 67 - 68 63 of_node_put(canvas_node); 64 + if (!canvas_pdev) 65 + return ERR_PTR(-EPROBE_DEFER); 69 66 70 67 /* 71 68 * If priv is NULL, it's probably because the canvas hasn't