Call RADEONFreeRec from RADEONFreeScreen_KMS even if info == NULL

It's safe now.

(Ported from amdgpu commit c9bd1399a13cea2e1331af2c826ca054b88db071)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2018-02-14 18:20:04 +01:00
committed by Michel Dänzer
parent 6b44b8c584
commit 16954fab59

View File

@@ -2206,14 +2206,9 @@ static Bool RADEONCloseScreen_KMS(ScreenPtr pScreen)
void RADEONFreeScreen_KMS(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"RADEONFreeScreen\n");
/* when server quits at PreInit, we don't need do this anymore*/
if (!info) return;
RADEONFreeRec(pScrn);
}