diff options
author | Dave Airlie <airlied@redhat.com> | 2018-09-12 10:56:40 +1000 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2018-10-04 17:26:20 +0200 |
commit | 66d36010a324480ac656e702e53f9c1f6fb60d5c (patch) | |
tree | ecfa0afefe428247ddd3fa833c221629412548a6 | |
parent | 795c58a1febb3deb9066d981b178d9cf14fdad03 (diff) |
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 b6c29a881eb49300fddfd0187cb10891f5257d3b)
-rw-r--r-- | hw/xfree86/drivers/modesetting/driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 792dfb655..8d29b130f 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -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; |