* [PATCH] drm/exynos: checking for NULL instead of IS_ERR()
@ 2018-10-13 10:21 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-10-13 10:21 UTC (permalink / raw)
To: Inki Dae, Maciej Purski
Cc: linux-samsung-soc, David Airlie, kernel-janitors, Seung-Woo Kim,
Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim, dri-devel
The of_drm_find_panel() function returns error pointers and never NULL
but we the driver assumes that ->panel is NULL when it's not present.
Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 07af7758066d..32f256749789 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
}
dsi->panel = of_drm_find_panel(device->dev.of_node);
- if (dsi->panel) {
+ if (IS_ERR(dsi->panel)) {
+ dsi->panel = NULL;
+ } else {
drm_panel_attach(dsi->panel, &dsi->connector);
dsi->connector.status = connector_status_connected;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/exynos: checking for NULL instead of IS_ERR()
@ 2018-10-13 10:21 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-10-13 10:21 UTC (permalink / raw)
To: Inki Dae, Maciej Purski
Cc: linux-samsung-soc, David Airlie, kernel-janitors, Seung-Woo Kim,
Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim, dri-devel
The of_drm_find_panel() function returns error pointers and never NULL
but we the driver assumes that ->panel is NULL when it's not present.
Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 07af7758066d..32f256749789 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
}
dsi->panel = of_drm_find_panel(device->dev.of_node);
- if (dsi->panel) {
+ if (IS_ERR(dsi->panel)) {
+ dsi->panel = NULL;
+ } else {
drm_panel_attach(dsi->panel, &dsi->connector);
dsi->connector.status = connector_status_connected;
}
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/exynos: checking for NULL instead of IS_ERR()
[not found] ` <CGME20181015074732eucas1p2b5da071e315bcfe1d9d97c9e885190f4@eucas1p2.samsung.com>
@ 2018-10-15 7:47 ` Andrzej Hajda
0 siblings, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2018-10-15 7:47 UTC (permalink / raw)
To: Dan Carpenter, Inki Dae, Maciej Purski
Cc: linux-samsung-soc, David Airlie, kernel-janitors, Seung-Woo Kim,
Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim, dri-devel
On 13.10.2018 12:21, Dan Carpenter wrote:
> The of_drm_find_panel() function returns error pointers and never NULL
> but we the driver assumes that ->panel is NULL when it's not present.
>
> Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for spotting it (and sorry for previous reply mistake).
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 07af7758066d..32f256749789 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
> }
>
> dsi->panel = of_drm_find_panel(device->dev.of_node);
> - if (dsi->panel) {
> + if (IS_ERR(dsi->panel)) {
> + dsi->panel = NULL;
> + } else {
> drm_panel_attach(dsi->panel, &dsi->connector);
> dsi->connector.status = connector_status_connected;
> }
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/exynos: checking for NULL instead of IS_ERR()
@ 2018-10-15 7:47 ` Andrzej Hajda
0 siblings, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2018-10-15 7:47 UTC (permalink / raw)
To: Dan Carpenter, Inki Dae, Maciej Purski
Cc: linux-samsung-soc, David Airlie, kernel-janitors, Seung-Woo Kim,
Krzysztof Kozlowski, Kyungmin Park, Kukjin Kim, dri-devel
On 13.10.2018 12:21, Dan Carpenter wrote:
> The of_drm_find_panel() function returns error pointers and never NULL
> but we the driver assumes that ->panel is NULL when it's not present.
>
> Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for spotting it (and sorry for previous reply mistake).
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 07af7758066d..32f256749789 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
> }
>
> dsi->panel = of_drm_find_panel(device->dev.of_node);
> - if (dsi->panel) {
> + if (IS_ERR(dsi->panel)) {
> + dsi->panel = NULL;
> + } else {
> drm_panel_attach(dsi->panel, &dsi->connector);
> dsi->connector.status = connector_status_connected;
> }
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-15 7:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13 10:21 [PATCH] drm/exynos: checking for NULL instead of IS_ERR() Dan Carpenter
2018-10-13 10:21 ` Dan Carpenter
[not found] ` <CGME20181015074732eucas1p2b5da071e315bcfe1d9d97c9e885190f4@eucas1p2.samsung.com>
2018-10-15 7:47 ` Andrzej Hajda
2018-10-15 7:47 ` Andrzej Hajda
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.