From 1fd452c403ca2cd9dcbd8465f9f72be52e15ac1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 8 Jul 2022 11:49:21 +0200 Subject: [PATCH] drm/panel-novatek-nt35510: Emit an error message if power off fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Returning an error code from a mipi_dsi remove callback fails, this is silently ignored. (mipi_dsi_drv_remove() propagates the return value to device_remove() which ignores it.) So emit an error code in the driver remove function and return 0. Signed-off-by: Uwe Kleine-König Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20220708094922.1408248-3-u.kleine-koenig@pengutronix.de --- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c index 40ea41b..1b3e015 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -974,9 +974,12 @@ static int nt35510_remove(struct mipi_dsi_device *dsi) mipi_dsi_detach(dsi); /* Power off */ ret = nt35510_power_off(nt); + if (ret) + dev_err(&dsi->dev, "Failed to power off\n"); + drm_panel_remove(&nt->panel); - return ret; + return 0; } /* -- 2.7.4