Fix build after r328020.
Should have noticed earlier but the build was already broken by another change. Reported by: Ravi Pokala
This commit is contained in:
parent
e64428edf7
commit
cf47945d85
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328041
@ -535,7 +535,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
|
||||
int error = 0;
|
||||
|
||||
if (dmat->segments == NULL) {
|
||||
dmat->segments = (bus_dma_segment_t *)malloc(dmat->nsegments,
|
||||
dmat->segments =
|
||||
(bus_dma_segment_t *)mallocarray(dmat->nsegments,
|
||||
sizeof(bus_dma_segment_t), M_BUSDMA, M_NOWAIT);
|
||||
if (dmat->segments == NULL) {
|
||||
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
|
||||
@ -647,7 +648,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddrp, int flags,
|
||||
else
|
||||
mflags = M_WAITOK;
|
||||
if (dmat->segments == NULL) {
|
||||
dmat->segments = (bus_dma_segment_t *)malloc(dmat->nsegments,
|
||||
dmat->segments =
|
||||
(bus_dma_segment_t *)mallocarray(dmat->nsegments,
|
||||
sizeof(bus_dma_segment_t), M_BUSDMA, mflags);
|
||||
if (dmat->segments == NULL) {
|
||||
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
|
||||
|
Loading…
Reference in New Issue
Block a user