]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: fix deadlock on _regmap_raw_write() error path
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Thu, 22 Sep 2016 09:02:25 +0000 (12:02 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 22 Sep 2016 10:24:22 +0000 (11:24 +0100)
commit5577975fe6c40b331253157bba2315cbc9fe6903
tree1015781676836a0e849c65a49e50679c1884b24d
parent5f255a38d95aec3b8821a2f05d6b9deebd9e7046
regmap: fix deadlock on _regmap_raw_write() error path

Commit 5f255a38d95a ("regmap: drop cache if the bus transfer error")
added a call to regcache_drop_region() to error path in
_regmap_raw_write(). However that path runs with regmap lock taken,
and regcache_drop_region() tries to re-take it, causing a deadlock.
Fix that by calling map->cache_ops->drop() directly.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c