Skip to content

Commit

Permalink
drm/vc4: drv: Add error handding for bind
Browse files Browse the repository at this point in the history
[ Upstream commit 9ce0af3 ]

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.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201027041442.30352-2-hoegeun.kwon@samsung.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Hoegeun Kwon authored and gregkh committed Nov 10, 2020
1 parent 2803667 commit fd57344
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/vc4/vc4_drv.c
Expand Up @@ -310,6 +310,7 @@ static int vc4_drm_bind(struct device *dev)
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);
Expand Down

0 comments on commit fd57344

Please sign in to comment.