drm/amdgpu: fix error handling in amdgpu_bo_do_create
authorChristian König <christian.koenig@amd.com>
Tue, 31 Oct 2017 08:36:13 +0000 (09:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Dec 2017 10:26:35 +0000 (11:26 +0100)
commita00b7ea3df52da50097d22c9eb3b0eba3e504838
treef69d90c1575a788d8320aed427558ea2f8c78ed1
parent402b1de75ce06404c96cf803e1fe0b5c685f7797
drm/amdgpu: fix error handling in amdgpu_bo_do_create

commit a695e43712242c354748e9bae5d137d4337a7694 upstream.

The bo structure is freed up in case of an error, so we can't do any
accounting if that happens.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c