drm/panel: p079zca: unconditionally remove the panel on removal
diff mbox series

Message ID 20180816140920.5009-1-heiko@sntech.de
State Accepted
Commit 882c35af565a352d3183bd4cb2f9e59414521f87
Headers show
Series
  • drm/panel: p079zca: unconditionally remove the panel on removal
Related show

Commit Message

Heiko Stübner Aug. 16, 2018, 2:09 p.m. UTC
There is no need to check innolux->base.dev when trying to remove
the panel, as that variable is always set directly before the panel
gets added and will still be available on panel_remove.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Philipp Zabel Aug. 16, 2018, 2:40 p.m. UTC | #1
On Thu, 2018-08-16 at 16:09 +0200, Heiko Stuebner wrote:
> There is no need to check innolux->base.dev when trying to remove
> the panel, as that variable is always set directly before the panel
> gets added and will still be available on panel_remove.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index 72edb334d997..ca4ae45dd307 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -506,8 +506,7 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi,
>  
>  static void innolux_panel_del(struct innolux_panel *innolux)
>  {
> -	if (innolux->base.dev)
> -		drm_panel_remove(&innolux->base);
> +	drm_panel_remove(&innolux->base);
>  }
>  
>  static int innolux_panel_probe(struct mipi_dsi_device *dsi)

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp
Thierry Reding Sept. 27, 2018, 12:05 p.m. UTC | #2
On Thu, Aug 16, 2018 at 04:09:20PM +0200, Heiko Stuebner wrote:
> There is no need to check innolux->base.dev when trying to remove
> the panel, as that variable is always set directly before the panel
> gets added and will still be available on panel_remove.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

Thierry

Patch
diff mbox series

diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index 72edb334d997..ca4ae45dd307 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -506,8 +506,7 @@  static int innolux_panel_add(struct mipi_dsi_device *dsi,
 
 static void innolux_panel_del(struct innolux_panel *innolux)
 {
-	if (innolux->base.dev)
-		drm_panel_remove(&innolux->base);
+	drm_panel_remove(&innolux->base);
 }
 
 static int innolux_panel_probe(struct mipi_dsi_device *dsi)