Fix a few more places where NULL was used instead of 0.
This commit is contained in:
parent
fc90128bf7
commit
79e51fd0d7
@ -263,7 +263,7 @@ static void DRM(cleanup_buf_error)(drm_device_t *dev, drm_buf_entry_t *entry)
|
||||
#if __HAVE_PCI_DMA
|
||||
if (entry->seg_count) {
|
||||
for (i = 0; i < entry->seg_count; i++) {
|
||||
if (entry->seglist[i] != NULL)
|
||||
if (entry->seglist[i] != 0)
|
||||
DRM(pci_free)(dev, entry->buf_size,
|
||||
(void *)entry->seglist[i],
|
||||
entry->seglist_bus[i]);
|
||||
@ -483,7 +483,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
|
||||
while ( entry->buf_count < count ) {
|
||||
vaddr = (vm_offset_t) DRM(pci_alloc)(dev, size, alignment,
|
||||
0xfffffffful, &bus_addr);
|
||||
if (vaddr == NULL) {
|
||||
if (vaddr == 0) {
|
||||
/* Set count correctly so we free the proper amount. */
|
||||
entry->buf_count = count;
|
||||
entry->seg_count = count;
|
||||
|
@ -75,7 +75,7 @@ void DRM(dma_takedown)(drm_device_t *dev)
|
||||
dma->bufs[i].buf_count,
|
||||
dma->bufs[i].seg_count);
|
||||
for (j = 0; j < dma->bufs[i].seg_count; j++) {
|
||||
if (dma->bufs[i].seglist[j] != NULL)
|
||||
if (dma->bufs[i].seglist[j] != 0)
|
||||
DRM(pci_free)(dev, dma->bufs[i].buf_size,
|
||||
(void *)dma->bufs[i].seglist[j],
|
||||
dma->bufs[i].seglist_bus[j]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user