diff options
author | Douglas Anderson <dianders@chromium.org> | 2019-07-22 11:24:36 -0700 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2019-07-26 16:32:25 +0200 |
commit | 4faba50edbcc1df467f8f308893edc3fdd95536e (patch) | |
tree | d3d9930edd9840797474bbab11ed658c49eeec26 /drivers/video | |
parent | cd5e1cbe1f0af7ab02b1b2e08c9d34f9158cedf4 (diff) | |
download | linux-4faba50edbcc1df467f8f308893edc3fdd95536e.tar.bz2 |
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: ffa3fd21de8a ("videomode: implement public of_get_display_timing()")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Sam 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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190722182439.44844-2-dianders@chromium.org
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/of_display_timing.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index f5c1c469c0af..5eedae0799f0 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -119,6 +119,7 @@ int of_get_display_timing(const struct device_node *np, const char *name, struct display_timing *dt) { struct device_node *timing_np; + int ret; if (!np) return -EINVAL; @@ -129,7 +130,11 @@ int of_get_display_timing(const struct device_node *np, const char *name, 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); |