]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix memory leaks at amdgpu_init() error path
authorTakashi Iwai <tiwai@suse.de>
Fri, 30 Mar 2018 20:45:11 +0000 (22:45 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 3 Apr 2018 18:08:46 +0000 (13:08 -0500)
commit4b0a1c1ab92ea040ba2e8ceb82b5a3e91ef6ffa6
tree2701d0ed3e88ce4dade4175ba5da665aa4c0a5fd
parentf64df2c297a7ed0465f7ccb2a2f2e045da29146d
drm/amdgpu: Fix memory leaks at amdgpu_init() error path

amdgpu driver checks vgacon_text_force() after some initializations
but without cleaning up.  This will result in leaks.

Move the check of vgacon_text_force() to the beginning of
amdgpu_init() for fixing it and also for optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c