dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/panel: simple: Fix panel_simple_dsi_probe
@ 2019-02-26  8:11 Peter Ujfalusi
  2019-04-23 11:57 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2019-02-26  8:11 UTC (permalink / raw)
  To: thierry.reding, airlied, daniel; +Cc: sam, linux-kernel, dri-devel

In case mipi_dsi_attach() fails remove the registered panel to avoid added
panel without corresponding device.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 0337583ffa49..90b4e75381e2 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3072,7 +3072,14 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
 	dsi->format = desc->format;
 	dsi->lanes = desc->lanes;
 
-	return mipi_dsi_attach(dsi);
+	err = mipi_dsi_attach(dsi);
+	if (err) {
+		struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
+
+		drm_panel_remove(&panel->base);
+	}
+
+	return err;
 }
 
 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/panel: simple: Fix panel_simple_dsi_probe
  2019-02-26  8:11 [PATCH] drm/panel: simple: Fix panel_simple_dsi_probe Peter Ujfalusi
@ 2019-04-23 11:57 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2019-04-23 11:57 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: airlied, sam, dri-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 387 bytes --]

On Tue, Feb 26, 2019 at 10:11:53AM +0200, Peter Ujfalusi wrote:
> In case mipi_dsi_attach() fails remove the registered panel to avoid added
> panel without corresponding device.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-23 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26  8:11 [PATCH] drm/panel: simple: Fix panel_simple_dsi_probe Peter Ujfalusi
2019-04-23 11:57 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).