drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10)
authorTom St Denis <tom.stdenis@amd.com>
Thu, 3 Mar 2016 14:23:48 +0000 (09:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Mar 2016 16:01:54 +0000 (11:01 -0500)
commit720a6ce3cedf664834df436c343ea2ccc26272fa
tree0901ca3b80e1e26e7a4ed1753e17f26da792a51c
parent98822a2f748cf400a1fa08eabd0ccf6baa146a92
drm/amd/amdgpu: Make afmt_init cleanup if alloc fails (DCEv10)

Make the function free memory and return an error code if the allocation
fails.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c