mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
modesetting: get pEnt after error checks
This saves us having to make sure we clean it up. Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -900,8 +900,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
|
||||
if (pScrn->numEntities != 1)
|
||||
return FALSE;
|
||||
|
||||
pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
|
||||
|
||||
if (flags & PROBE_DETECT) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -910,6 +908,8 @@ PreInit(ScrnInfoPtr pScrn, int flags)
|
||||
if (!GetRec(pScrn))
|
||||
return FALSE;
|
||||
|
||||
pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
|
||||
|
||||
ms = modesettingPTR(pScrn);
|
||||
ms->SaveGeneration = -1;
|
||||
ms->pEnt = pEnt;
|
||||
|
||||
Reference in New Issue
Block a user