diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-18 03:22:40 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-18 03:22:40 +0000 |
commit | 0cbe1d498423477afdff66be3c6b5d3999c6df8b (patch) | |
tree | 107ef30765005d9a9910c8712e5582968013c296 /sys/dev | |
parent | 2e04f1f2631c21740d813eb98ed1e4b4006d816f (diff) |
Remove an error-on-NULL condition after a mallocarray() call that cannot
fail. This codepath doesn't exist upstream, so it's fine to change.
ok jsg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_ttm.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_ttm.c b/sys/dev/pci/drm/radeon/radeon_ttm.c index 86f4126d15e..fe74f296667 100644 --- a/sys/dev/pci/drm/radeon/radeon_ttm.c +++ b/sys/dev/pci/drm/radeon/radeon_ttm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_ttm.c,v 1.11 2015/04/06 07:38:49 jsg Exp $ */ +/* $OpenBSD: radeon_ttm.c,v 1.12 2015/12/18 03:22:39 mmcc Exp $ */ /* * Copyright 2009 Jerome Glisse. * All Rights Reserved. @@ -582,11 +582,6 @@ static struct ttm_tt *radeon_ttm_tt_create(struct ttm_bo_device *bdev, gtt->segs = mallocarray(gtt->ttm.ttm.num_pages, sizeof(bus_dma_segment_t), M_DRM, M_WAITOK | M_ZERO); - if (gtt->segs == NULL) { - ttm_dma_tt_fini(>t->ttm); - free(gtt, M_DRM, 0); - return NULL; - } if (bus_dmamap_create(rdev->dmat, size, gtt->ttm.ttm.num_pages, size, 0, BUS_DMA_WAITOK, >t->map)) { |