]> git.baikalelectronics.ru Git - kernel.git/commit
atm: nicstar: Unmap DMA on send error
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 16 Nov 2020 16:21:14 +0000 (17:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Nov 2020 00:42:07 +0000 (16:42 -0800)
commit0269074f2cbfafc09fbf2de89b56da3af7fea7eb
tree64bcf02a80ddf3c915c55c92af4cd3b8f374c052
parentb0c3e85cf5758bec7538e39ce6b7f7e70240fc6f
atm: nicstar: Unmap DMA on send error

The `skb' is mapped for DMA in ns_send() but does not unmap DMA in case
push_scqe() fails to submit the `skb'. The memory of the `skb' is
released so only the DMA mapping is leaking.

Unmap the DMA mapping in case push_scqe() failed.

Fixes: b1c8c4594773f ("atm: [nicstar] remove virt_to_bus() and support 64-bit platforms")
Cc: Chas Williams <3chas3@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/atm/nicstar.c