Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d6160b3 authored by Ajit Pandey's avatar Ajit Pandey Committed by Gerrit - the friendly Code Review server
Browse files

dsp: q6voice: Reset dma_buf pointer to NULL in case of failure



In case of voice_alloc_rtac_mem_map_table() failure no memory get
allocated for rtac but dma_buf pointer might get corrupted and may
point to some unmapped memory region. Since we are only doing NULL
pointer check for dma_buf in method is_rtac_memory_allocated() we
need to reset such pointer to NULL in failure case.

Change-Id: I5e81adad4e302620757375f87fa15344e07dccf8
Signed-off-by: default avatarAjit Pandey <ajitp@codeaurora.org>
parent 360a45ba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3852,6 +3852,7 @@ int voc_map_rtac_block(struct rtac_cal_block_data *cal_block)
				&cal_block->cal_data.paddr,
				cal_block->map_data.map_size);

			common.rtac_mem_map_table.dma_buf = NULL;
			goto done_unlock;
		}
	}