]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: sh_mobile: fix leak when using DMA bounce buffer
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 24 Aug 2018 14:52:46 +0000 (16:52 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 30 Aug 2018 21:13:59 +0000 (23:13 +0200)
commitc9b48ddef3e39b48224a09c81df247c86aa512ff
tree213a643dce403942ef2057a48c665877df57ac5c
parent0b3663544e7723edb64977693fa8bd75aafa6d66
i2c: sh_mobile: fix leak when using DMA bounce buffer

We only freed the bounce buffer after successful DMA, missing the cases
where DMA setup may have gone wrong. Use a better location which always
gets called after each message and use 'stop_after_dma' as a flag for a
successful transfer.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-sh_mobile.c