serial: tegra: Fix memory leak on DMA setup failure
If the call to dmaengine_slave_config() fails, then the DMA buffer will not be freed/unmapped. Fix this by moving the code that stores the address of the buffer in the tegra_uart_port structure to before the call to dmaengine_slave_config(). Reported-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NJon Hunter <jonathanh@nvidia.com> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录