author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 21 Oct 2019 11:59:16 +0000 (14:59 +0300) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 22 Oct 2019 12:36:49 +0000 (15:36 +0300) | ||
commit | 6492f8068542b3520c3aee2653f93c2e63762e71 | |
tree | 6033f461fb178435341f713a3e17b97d8f09f68f | tree | snapshot (tar.xz tar.gz zip) |
parent | e14f25eac1d896b9eff8c3d5dd62145f124b493f | commit | diff |
drm/tidss: fix probe-time memleak
If tidss_modeset_init fails, which happens easily due to deferred
probing, drm_mode_config_cleanup() is not called and we leak lots of DRM
objects.
Fix this by adding the proper error handling, and for consistency, add
tidss_modeset_cleanup() which is the mirror for tidss_modeset_init().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
If tidss_modeset_init fails, which happens easily due to deferred
probing, drm_mode_config_cleanup() is not called and we leak lots of DRM
objects.
Fix this by adding the proper error handling, and for consistency, add
tidss_modeset_cleanup() which is the mirror for tidss_modeset_init().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/tidss/tidss_drv.c | diff | blob | history | |
drivers/gpu/drm/tidss/tidss_kms.c | diff | blob | history | |
drivers/gpu/drm/tidss/tidss_kms.h | diff | blob | history |