diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2009-02-08 22:21:40 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2009-02-08 22:21:40 +0000 |
commit | 7f35b751d8f8171547873fafc81654ec61a3f1dc (patch) | |
tree | d25cb00de5fc48330138893a10a3c225c8c476ad /sys | |
parent | e502584a597f55f57e566de0c18b97870c3523a2 (diff) |
Fix uninitialized arguments.
Found by LLVM/Clang Static Analyzer.
ok oga@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/drm_pci.c b/sys/dev/pci/drm/drm_pci.c index cba243f001b..760b504dbac 100644 --- a/sys/dev/pci/drm/drm_pci.c +++ b/sys/dev/pci/drm/drm_pci.c @@ -49,8 +49,8 @@ drm_pci_alloc(bus_dma_tag_t dmat, size_t size, size_t align, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW, &dmah->dmamap) != 0) goto dmahfree; - if (bus_dmamem_alloc(dmat, size, align, 0, - &dmah->seg, 1, &nsegs, BUS_DMA_NOWAIT) != 0) { + if ((ret = bus_dmamem_alloc(dmat, size, align, 0, + &dmah->seg, 1, &nsegs, BUS_DMA_NOWAIT)) != 0) { DRM_ERROR("bus_dmamem_alloc(%zd, %zd) returned %d\n", size, align, ret); goto destroy; @@ -61,8 +61,8 @@ drm_pci_alloc(bus_dma_tag_t dmat, size_t size, size_t align, goto free; } - if (bus_dmamem_map(dmat, &dmah->seg, 1, size, - (caddr_t*)&dmah->addr, BUS_DMA_NOWAIT) != 0) { + if ((ret = bus_dmamem_map(dmat, &dmah->seg, 1, size, + (caddr_t*)&dmah->addr, BUS_DMA_NOWAIT)) != 0) { DRM_ERROR("bus_dmamem_map() failed %d\n", ret); goto free; } |