summaryrefslogtreecommitdiff
path: root/src/mga_driver.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-09-26 22:35:48 -0400
committerMatt Turner <mattst88@gmail.com>2011-09-27 22:48:21 -0400
commit1036e32e006d496023553ea566cb13ae93933719 (patch)
tree8d20c71fed14ed2883fc883065272eb68ae2ee3c /src/mga_driver.c
parentee09a9a340f8946f2d4a71a431b64189dbb5c256 (diff)
Remove if(E != NULL) checks around free(E)
Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mga_driver.c')
-rw-r--r--src/mga_driver.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c
index d4ae346..dcbfabf 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -644,8 +644,6 @@ MGAGetRec(ScrnInfoPtr pScrn)
void
MGAFreeRec(ScrnInfoPtr pScrn)
{
- if (pScrn->driverPrivate == NULL)
- return;
free(pScrn->driverPrivate);
pScrn->driverPrivate = NULL;
}
@@ -2430,8 +2428,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->FbMapSize,
LOOKUP_BEST_REFRESH);
- if (linePitches)
- free(linePitches);
+ free(linePitches);
}
if (i < 1 && pMga->FBDev) {
@@ -3750,16 +3747,11 @@ MGACloseScreen(int scrnIndex, ScreenPtr pScreen)
#endif
if (pMga->CursorInfoRec)
xf86DestroyCursorInfoRec(pMga->CursorInfoRec);
- if (pMga->ShadowPtr)
- free(pMga->ShadowPtr);
- if (pMga->DGAModes)
- free(pMga->DGAModes);
- if (pMga->adaptor)
- free(pMga->adaptor);
- if (pMga->portPrivate)
- free(pMga->portPrivate);
- if (pMga->ScratchBuffer)
- free(pMga->ScratchBuffer);
+ free(pMga->ShadowPtr);
+ free(pMga->DGAModes);
+ free(pMga->adaptor);
+ free(pMga->portPrivate);
+ free(pMga->ScratchBuffer);
pScrn->vtSema = FALSE;