Commit 4faba50e authored by Douglas Anderson's avatar Douglas Anderson Committed by Bartlomiej Zolnierkiewicz

video: of: display_timing: Add of_node_put() in of_get_display_timing()

From code inspection it can be seen that of_get_display_timing() is
lacking an of_node_put().  Add it.

Fixes: ffa3fd21 ("videomode: implement public of_get_display_timing()")
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190722182439.44844-2-dianders@chromium.org
parent cd5e1cbe
...@@ -119,6 +119,7 @@ int of_get_display_timing(const struct device_node *np, const char *name, ...@@ -119,6 +119,7 @@ int of_get_display_timing(const struct device_node *np, const char *name,
struct display_timing *dt) struct display_timing *dt)
{ {
struct device_node *timing_np; struct device_node *timing_np;
int ret;
if (!np) if (!np)
return -EINVAL; return -EINVAL;
...@@ -129,7 +130,11 @@ int of_get_display_timing(const struct device_node *np, const char *name, ...@@ -129,7 +130,11 @@ int of_get_display_timing(const struct device_node *np, const char *name,
return -ENOENT; return -ENOENT;
} }
return of_parse_display_timing(timing_np, dt); ret = of_parse_display_timing(timing_np, dt);
of_node_put(timing_np);
return ret;
} }
EXPORT_SYMBOL_GPL(of_get_display_timing); EXPORT_SYMBOL_GPL(of_get_display_timing);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment