Skip to content
Commit 8f8e48f4 authored by Jon Hunter's avatar Jon Hunter Committed by Greg Kroah-Hartman
Browse files

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: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c35b49b7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment