linux/drivers/gpu/drm/amd
Colin Ian King 2f2c3b36fc drm/amd/display: fix memory leaks on error exit return
Currently in the case where some of the allocations fail for dce110_tgv,
dce110_xfmv, dce110_miv or dce110_oppv then the exit return path ends
up leaking allocated objects. Fix this by kfree'ing them before returning.
Also re-work the comparison of the null pointers to use the !ptr idiom.

Detected by CoverityScan, CID#1460246, 1460325, 1460324, 1460392
("Resource Leak")

Fixes: c4562236b3bc ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-28 17:55:40 -05:00
..
acp
amdgpu drm/amdgpu: drop experimental flag for raven 2017-11-28 17:53:34 -05:00
amdkfd main drm pull request for v4.15 2017-11-15 20:42:10 -08:00
display drm/amd/display: fix memory leaks on error exit return 2017-11-28 17:55:40 -05:00
include amdgpu DC display code for Vega. 2017-11-17 14:34:42 -08:00
lib drm/amd/chash: Fix typo 2017-09-28 16:03:29 -04:00
powerplay fixes/cleanups for rc1, non-desktop flags for VR 2017-11-23 21:04:56 -10:00
scheduler main drm pull request for v4.15 2017-11-15 20:42:10 -08:00