diff options
Diffstat (limited to 'drivers/video/of_display_timing.c')
-rw-r--r-- | drivers/video/of_display_timing.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index f5c1c469c0af..abc9ada798ee 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -119,17 +119,20 @@ 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; timing_np = of_get_child_by_name(np, name); - if (!timing_np) { - pr_err("%pOF: could not find node '%s'\n", np, name); + if (!timing_np) 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); |