Commit 320e421e authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

drm: of: always initialize panel in drm_of_find_panel_or_bridge()

The callers expect "panel" to be initialized, but that isn't true if we
return -ENODEV.  It causes bugs like:

    drivers/gpu/drm/tve200/tve200_drv.c:83 tve200_modeset_init()
    error: uninitialized symbol 'panel'.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170925103038.lvr5msjvekwczctn@mwanda
parent 44390ef5
......@@ -233,6 +233,8 @@ int drm_of_find_panel_or_bridge(const struct device_node *np,
if (!panel && !bridge)
return -EINVAL;
if (panel)
*panel = NULL;
remote = of_graph_get_remote_node(np, port, endpoint);
if (!remote)
......
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