drm/vc4: drv: Add error handding for bind 86/246186/2 accepted/tizen/unified/20201028.123938 submit/tizen/20201027.005200
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 26 Oct 2020 11:47:31 +0000 (20:47 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 27 Oct 2020 00:48:29 +0000 (00:48 +0000)
There is a problem that if vc4_drm bind fails, a memory leak occurs on
the drm_property_create side. Add error handding for drm_mode_config.

Change-Id: If23c0dabf01b85368871981f0cba427982922615
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/gpu/drm/vc4/vc4_drv.c

index d840bca..d0e70d1 100644 (file)
@@ -328,6 +328,7 @@ unbind_all:
        component_unbind_all(dev, drm);
 gem_destroy:
        vc4_gem_destroy(drm);
+       drm_mode_config_cleanup(drm);
        vc4_bo_cache_destroy(drm);
 dev_put:
        drm_dev_put(drm);