i2c: rcar: avoid race when unregistering slave client
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 8 Aug 2019 19:39:10 +0000 (21:39 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 14 Aug 2019 12:49:36 +0000 (14:49 +0200)
commit7b814d852af6944657c2961039f404c4490771c0
treed9c018472072e09d33fc9a0e7de6a46211b4e2da
parent8fc3ae3b109d17157102f0abf9c8fb1e16bf810a
i2c: rcar: avoid race when unregistering slave client

After we disabled interrupts, there might still be an active one
running. Sync before clearing the pointer to the slave device.

Fixes: de20d1857dd6 ("i2c: rcar: add slave support")
Reported-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Krzysztof Adamski <krzysztof.adamski@nokia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rcar.c