[Sound-open-firmware] [PATCH] ipc: trap dma_start() return value, bail on error
Liam Girdwood
liam.r.girdwood at linux.intel.com
Mon May 21 12:42:52 CEST 2018
On Fri, 2018-05-18 at 18:39 -0500, Pierre-Louis Bossart wrote:
> Detected with Coverity, we check dma_start everywhere else.
>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> ---
> src/ipc/ipc.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/ipc/ipc.c b/src/ipc/ipc.c
> index fbb1be6..3e23d9c 100644
> --- a/src/ipc/ipc.c
> +++ b/src/ipc/ipc.c
> @@ -482,7 +482,11 @@ int ipc_get_page_descriptors(struct dma *dmac, uint8_t
> *page_table,
> wait_init(&complete);
>
> /* start the copy of page table to DSP */
> - dma_start(dmac, chan);
> + ret = dma_start(dmac, chan);
> + if (ret < 0) {
> + trace_ipc_error("ePt");
> + goto out;
> + }
>
> /* wait for DMA to complete */
> complete.timeout = PLATFORM_HOST_DMA_TIMEOUT;
Applied.
Thanks
Liam
More information about the Sound-open-firmware
mailing list