Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-20 Thread Jon Hunter
On 20/05/15 10:51, Jon Hunter wrote: > > On 20/05/15 04:57, Alexandre Courbot wrote: > > [snip] > >> There may still be a leak (that is not related to your patch) in the >> RX path though: >> >> dma_buf = dma_alloc_coherent(...); >> ret = dmaengine_slave_config(...); >> if (ret <

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-20 Thread Jon Hunter
On 20/05/15 04:57, Alexandre Courbot wrote: [snip] > There may still be a leak (that is not related to your patch) in the > RX path though: > > dma_buf = dma_alloc_coherent(...); > ret = dmaengine_slave_config(...); > if (ret < 0) { > ... > goto scrub; > } > >

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-20 Thread Jon Hunter
On 20/05/15 04:57, Alexandre Courbot wrote: [snip] There may still be a leak (that is not related to your patch) in the RX path though: dma_buf = dma_alloc_coherent(...); ret = dmaengine_slave_config(...); if (ret 0) { ... goto scrub; }

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-20 Thread Jon Hunter
On 20/05/15 10:51, Jon Hunter wrote: On 20/05/15 04:57, Alexandre Courbot wrote: [snip] There may still be a leak (that is not related to your patch) in the RX path though: dma_buf = dma_alloc_coherent(...); ret = dmaengine_slave_config(...); if (ret 0) { ...

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-19 Thread Alexandre Courbot
On Wed, May 13, 2015 at 5:23 PM, Jon Hunter wrote: > > On 13/05/15 05:56, Alexandre Courbot wrote: >> On Tue, May 12, 2015 at 6:51 PM, Jon Hunter wrote: >>> >>> On 12/05/15 09:39, Alexandre Courbot wrote: On Tue, May 5, 2015 at 11:17 PM, Jon Hunter wrote: > Function

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-19 Thread Alexandre Courbot
On Wed, May 13, 2015 at 5:23 PM, Jon Hunter jonath...@nvidia.com wrote: On 13/05/15 05:56, Alexandre Courbot wrote: On Tue, May 12, 2015 at 6:51 PM, Jon Hunter jonath...@nvidia.com wrote: On 12/05/15 09:39, Alexandre Courbot wrote: On Tue, May 5, 2015 at 11:17 PM, Jon Hunter

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-13 Thread Jon Hunter
On 13/05/15 05:56, Alexandre Courbot wrote: > On Tue, May 12, 2015 at 6:51 PM, Jon Hunter wrote: >> >> On 12/05/15 09:39, Alexandre Courbot wrote: >>> On Tue, May 5, 2015 at 11:17 PM, Jon Hunter wrote: Function tegra_uart_dma_channel_allocate() does not check that dma_map_single()

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-13 Thread Jon Hunter
On 13/05/15 05:56, Alexandre Courbot wrote: On Tue, May 12, 2015 at 6:51 PM, Jon Hunter jonath...@nvidia.com wrote: On 12/05/15 09:39, Alexandre Courbot wrote: On Tue, May 5, 2015 at 11:17 PM, Jon Hunter jonath...@nvidia.com wrote: Function tegra_uart_dma_channel_allocate() does not check

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Alexandre Courbot
On Tue, May 12, 2015 at 6:51 PM, Jon Hunter wrote: > > On 12/05/15 09:39, Alexandre Courbot wrote: >> On Tue, May 5, 2015 at 11:17 PM, Jon Hunter wrote: >>> Function tegra_uart_dma_channel_allocate() does not check that >>> dma_map_single() mapped the DMA buffer correctly. Add a check for this

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Jon Hunter
On 12/05/15 09:39, Alexandre Courbot wrote: > On Tue, May 5, 2015 at 11:17 PM, Jon Hunter wrote: >> Function tegra_uart_dma_channel_allocate() does not check that >> dma_map_single() mapped the DMA buffer correctly. Add a check for this >> and appropriate error handling. >> >> Furthermore, if

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Alexandre Courbot
On Tue, May 5, 2015 at 11:17 PM, Jon Hunter wrote: > Function tegra_uart_dma_channel_allocate() does not check that > dma_map_single() mapped the DMA buffer correctly. Add a check for this > and appropriate error handling. > > Furthermore, if dmaengine_slave_config() (called by >

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Alexandre Courbot
On Tue, May 5, 2015 at 11:17 PM, Jon Hunter jonath...@nvidia.com wrote: Function tegra_uart_dma_channel_allocate() does not check that dma_map_single() mapped the DMA buffer correctly. Add a check for this and appropriate error handling. Furthermore, if dmaengine_slave_config() (called by

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Jon Hunter
On 12/05/15 09:39, Alexandre Courbot wrote: On Tue, May 5, 2015 at 11:17 PM, Jon Hunter jonath...@nvidia.com wrote: Function tegra_uart_dma_channel_allocate() does not check that dma_map_single() mapped the DMA buffer correctly. Add a check for this and appropriate error handling.

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Alexandre Courbot
On Tue, May 12, 2015 at 6:51 PM, Jon Hunter jonath...@nvidia.com wrote: On 12/05/15 09:39, Alexandre Courbot wrote: On Tue, May 5, 2015 at 11:17 PM, Jon Hunter jonath...@nvidia.com wrote: Function tegra_uart_dma_channel_allocate() does not check that dma_map_single() mapped the DMA buffer

[PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-05 Thread Jon Hunter
Function tegra_uart_dma_channel_allocate() does not check that dma_map_single() mapped the DMA buffer correctly. Add a check for this and appropriate error handling. Furthermore, if dmaengine_slave_config() (called by tegra_uart_dma_channel_allocate()) fails, then memory allocated/mapped is not

[PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-05 Thread Jon Hunter
Function tegra_uart_dma_channel_allocate() does not check that dma_map_single() mapped the DMA buffer correctly. Add a check for this and appropriate error handling. Furthermore, if dmaengine_slave_config() (called by tegra_uart_dma_channel_allocate()) fails, then memory allocated/mapped is not