]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers
authorPeter Rosin <peda@axentia.se>
Wed, 20 Jun 2018 09:43:23 +0000 (11:43 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 29 Jun 2018 06:19:52 +0000 (08:19 +0200)
commit8ba7c9c785648fdc985e29fc582c68c8d756d5ad
treef38b5356e2e3f24673760f47bcea33257c588d48
parent82e13bc065f339a30f9f5addde1fbc3c5c3a050d
i2c: smbus: kill memory leak on emulated and failed DMA SMBus xfers

If DMA safe memory was allocated, but the subsequent I2C transfer
fails the memory is leaked. Plug this leak.

Fixes: f282afcb1c9d ("i2c: smbus: use DMA safe buffers for emulated SMBus transactions")
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/i2c-core-smbus.c