Commit 3fb756d8 authored by Jody McIntyre's avatar Jody McIntyre

dma.c vfree() checking cleanups.

Signed-off by: James Lamanna <jlamanna@gmail.com>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarJody McIntyre <scjody@modernduck.com>
parent ad072b28
...@@ -127,16 +127,12 @@ void dma_region_free(struct dma_region *dma) ...@@ -127,16 +127,12 @@ void dma_region_free(struct dma_region *dma)
dma->dev = NULL; dma->dev = NULL;
} }
if (dma->sglist) { vfree(dma->sglist);
vfree(dma->sglist); dma->sglist = NULL;
dma->sglist = NULL;
}
if (dma->kvirt) { vfree(dma->kvirt);
vfree(dma->kvirt); dma->kvirt = NULL;
dma->kvirt = NULL; dma->n_pages = 0;
dma->n_pages = 0;
}
} }
/* find the scatterlist index and remaining offset corresponding to a /* find the scatterlist index and remaining offset corresponding to a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment