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

video: of: display_timing: Don't yell if no timing node is present

There may be cases (like in panel-simple.c) where we have a sane
fallback if no timings are specified in the device tree. Let's get
rid of the unconditional pr_err(). We can add error messages in
individual drivers if it makes sense.

NOTE: we'll still print errors if the node is present but there are
problems parsing the timings.

Fixes: b8a2948fa2b3 ("drm/panel: simple: Add ability to override typical timing")
Reported-by: Sam Ravnborg <sam@ravnborg.org>
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-3-dianders@chromium.org

authored by

Douglas Anderson and committed by
Bartlomiej Zolnierkiewicz
892e8ba3 4faba50e

+1 -3
+1 -3
drivers/video/of_display_timing.c
··· 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 131 ret = of_parse_display_timing(timing_np, dt); 134 132