drm: arm: hdlcd: Don't destroy plane manually in hdlcd_setup_crtc()
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 17 Jan 2018 21:55:27 +0000 (23:55 +0200)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Tue, 31 Jul 2018 15:31:50 +0000 (16:31 +0100)
The top-level error handler calls drm_mode_config_cleanup() which will
destroy all planes. There's no need to destroy them manually in lower
error handlers.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/hdlcd_crtc.c

index f3f08cd6e9efba6c88bcb44ad3531318ce2871bd..c36c75bef6d9d890d0cf461cf81f5168c0dafb3d 100644 (file)
@@ -334,10 +334,8 @@ int hdlcd_setup_crtc(struct drm_device *drm)
 
        ret = drm_crtc_init_with_planes(drm, &hdlcd->crtc, primary, NULL,
                                        &hdlcd_crtc_funcs, NULL);
-       if (ret) {
-               hdlcd_plane_destroy(primary);
+       if (ret)
                return ret;
-       }
 
        drm_crtc_helper_add(&hdlcd->crtc, &hdlcd_crtc_helper_funcs);
        return 0;