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>
(cherry picked from commit b6c29a881e
)
This commit is contained in:
parent
795c58a1fe
commit
66d36010a3
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user