* [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
@ 2017-09-25 10:30 ` Dan Carpenter
0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2017-09-25 10:30 UTC (permalink / raw)
To: Daniel Vetter, Linus Walleij
Cc: Jani Nikula, Sean Paul, David Airlie, dri-devel, linux-kernel,
kernel-janitors
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: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 8dafbdfcd2ea..4c191c050e7d 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -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)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
@ 2017-09-25 10:30 ` Dan Carpenter
0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2017-09-25 10:30 UTC (permalink / raw)
To: Daniel Vetter, Linus Walleij
Cc: Jani Nikula, Sean Paul, David Airlie, dri-devel, linux-kernel,
kernel-janitors
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: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 8dafbdfcd2ea..4c191c050e7d 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -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)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
2017-09-25 10:30 ` Dan Carpenter
(?)
@ 2017-09-25 15:34 ` Linus Walleij
-1 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-09-25 15:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: Daniel Vetter, Jani Nikula, Sean Paul, David Airlie,
open list:DRM PANEL DRIVERS, linux-kernel, kernel-janitors
On Mon, Sep 25, 2017 at 12:30 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> 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: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
I am travelling right now but will apply the patch on monday in
one week from now.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
@ 2017-09-25 15:34 ` Linus Walleij
0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-09-25 15:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors, linux-kernel, open list:DRM PANEL DRIVERS,
Daniel Vetter
On Mon, Sep 25, 2017 at 12:30 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> 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: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
I am travelling right now but will apply the patch on monday in
one week from now.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
@ 2017-09-25 15:34 ` Linus Walleij
0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-09-25 15:34 UTC (permalink / raw)
To: Dan Carpenter
Cc: kernel-janitors, linux-kernel, open list:DRM PANEL DRIVERS,
Daniel Vetter
On Mon, Sep 25, 2017 at 12:30 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> 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: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
I am travelling right now but will apply the patch on monday in
one week from now.
Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
2017-09-25 10:30 ` Dan Carpenter
@ 2017-09-30 23:32 ` Linus Walleij
-1 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-09-30 23:32 UTC (permalink / raw)
To: Dan Carpenter
Cc: Daniel Vetter, Jani Nikula, Sean Paul, David Airlie,
open list:DRM PANEL DRIVERS, linux-kernel, kernel-janitors
On Mon, Sep 25, 2017 at 12:30 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> 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: Dan Carpenter <dan.carpenter@oracle.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge()
@ 2017-09-30 23:32 ` Linus Walleij
0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2017-09-30 23:32 UTC (permalink / raw)
To: Dan Carpenter
Cc: Daniel Vetter, Jani Nikula, Sean Paul, David Airlie,
open list:DRM PANEL DRIVERS, linux-kernel, kernel-janitors
On Mon, Sep 25, 2017 at 12:30 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> 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: Dan Carpenter <dan.carpenter@oracle.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-30 23:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 10:30 [PATCH] drm: of: always initialize panel in drm_of_find_panel_or_bridge() Dan Carpenter
2017-09-25 10:30 ` Dan Carpenter
2017-09-25 15:34 ` Linus Walleij
2017-09-25 15:34 ` Linus Walleij
2017-09-25 15:34 ` Linus Walleij
2017-09-30 23:32 ` Linus Walleij
2017-09-30 23:32 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.