| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * OF helpers for parsing display timings |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * based on of_videomode.c by Sascha Hauer <s.hauer@pengutronix.de> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This file is released under the GPLv2 |
|---|
| 9 | 8 | */ |
|---|
| 10 | 9 | #include <linux/export.h> |
|---|
| 11 | 10 | #include <linux/of.h> |
|---|
| .. | .. |
|---|
| 120 | 119 | struct display_timing *dt) |
|---|
| 121 | 120 | { |
|---|
| 122 | 121 | struct device_node *timing_np; |
|---|
| 122 | + int ret; |
|---|
| 123 | 123 | |
|---|
| 124 | 124 | if (!np) |
|---|
| 125 | 125 | return -EINVAL; |
|---|
| 126 | 126 | |
|---|
| 127 | 127 | timing_np = of_get_child_by_name(np, name); |
|---|
| 128 | | - if (!timing_np) { |
|---|
| 129 | | - pr_err("%pOF: could not find node '%s'\n", np, name); |
|---|
| 128 | + if (!timing_np) |
|---|
| 130 | 129 | return -ENOENT; |
|---|
| 131 | | - } |
|---|
| 132 | 130 | |
|---|
| 133 | | - return of_parse_display_timing(timing_np, dt); |
|---|
| 131 | + ret = of_parse_display_timing(timing_np, dt); |
|---|
| 132 | + |
|---|
| 133 | + of_node_put(timing_np); |
|---|
| 134 | + |
|---|
| 135 | + return ret; |
|---|
| 134 | 136 | } |
|---|
| 135 | 137 | EXPORT_SYMBOL_GPL(of_get_display_timing); |
|---|
| 136 | 138 | |
|---|
| .. | .. |
|---|
| 170 | 172 | goto entryfail; |
|---|
| 171 | 173 | } |
|---|
| 172 | 174 | |
|---|
| 173 | | - pr_debug("%pOF: using %s as default timing\n", np, entry->name); |
|---|
| 175 | + pr_debug("%pOF: using %pOFn as default timing\n", np, entry); |
|---|
| 174 | 176 | |
|---|
| 175 | 177 | native_mode = entry; |
|---|
| 176 | 178 | |
|---|