Call AMDGPUFreeRec from AMDGPUFreeScreen_KMS even if info == NULL

It's safe now.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2015-11-02 18:21:50 +09:00
committed by Michel Dänzer
parent fb8444e731
commit c9bd1399a1

View File

@@ -1031,15 +1031,10 @@ static Bool AMDGPUCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL)
void AMDGPUFreeScreen_KMS(FREE_SCREEN_ARGS_DECL)
{
SCRN_INFO_PTR(arg);
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, AMDGPU_LOGLEVEL_DEBUG,
"AMDGPUFreeScreen\n");
/* when server quits at PreInit, we don't need do this anymore */
if (!info)
return;
AMDGPUFreeRec(pScrn);
}