From: Heiko Stuebner Date: Thu, 16 Aug 2018 14:09:20 +0000 (+0200) Subject: drm/panel: p079zca: unconditionally remove the panel on removal X-Git-Tag: for-linus-20190104~57^2~20^2~171 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=882c35af565a352d3183bd4cb2f9e59414521f87;p=linux-2.6-block.git drm/panel: p079zca: unconditionally remove the panel on removal 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 Reviewed-by: Philipp Zabel Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20180816140920.5009-1-heiko@sntech.de --- 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)