Second Round of LTSI-v4.14 Backports of I2C R-Car Fixes

Base:
* v4.14.61
* Backports of components for Renesas SoCs to v4.18
* First round of Backports of I2C R-Car Fixes

Backport of post-v4.18 fix for i2c-shmobile and I2C core
The focus of these fixes is to make DMA buffer handling safe
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAluftNgACgkQ189kaWo3
T75iCw/+IIQIdquVa8SRRmAONE3BFZBsSXbpjX7ByTGmkJ44iv6APXnIbIpvG8hH
6wo4RE5dnNpP5tsWO2j/JdfsMu01BJ5jeLKSbT+xLBRyF6SYhAUFfeIrGfeaur4V
IK2gpYg5lDyDk6TLlHzUwFpLP9ApYzR43DN+dIgOtc68Ety/uAIeWL/MElcpmrRp
4/kX2qrDLdL6D2ZuQw3PQsjI8478qvJF48WU0wA8ITXPkNASStUGgES4Hm3C+NUk
L6wJf2A6hPjwtKIPL7hwdLGeHVjPy44bP0PdaDSZIqLtdQAxh7JNnpkf07KtAVJx
f7kopBwYscOJiinhx7M/Thnc2zTZOAdHuYyiieHuqmj0CuwAt9lCit50yyjR4ebH
SG2sFTXclUECNN6IO3/cVzOHaIqDSCZszrJp2UCawaE+NSBaGDmsgFSI1YqgFM+U
va7v5S+DtEyx+1A/slk7FrZPM3eNl8716LXv8FEazJbYErnPDDCC/eltdbK9mZo+
DrMslwIdx7QPhyRcf5kizQRsNg5RC8gliyQMYaxA5nYOtaOt/lyD/oSiggySefQP
LyBm1gkb0GGKUjgVsd/9Xdg/M5APqjU8L09KhQBBcRU7FWm45y0bvwYUt0OYcyKe
vlu5S0nw5HhnPHEqY3KDbUH8fF4MmQnniNIN3o273QjgV15An+s=
=3b6E
-----END PGP SIGNATURE-----
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>
(cherry picked from commit cebc07d84ad71bc58d6f59b770e4347da48a5a2b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed