mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
regmap: cache: bail in regmap_async_complete() for bus-less maps
Commit f8bd822cb ("regmap: cache: Factor out block sync") made
regcache_rbtree_sync() call regmap_async_complete(), which in turn does
not check for map->bus before dereferencing it.
This causes a NULL pointer dereference on bus-less maps.
Signed-off-by: Daniel Mack <[email protected]>
Cc: [email protected] [v3.10 only]
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
8bb495e3f0
commit
f2e055e7c9
1 changed files with 1 additions and 1 deletions
|
|
@ -1717,7 +1717,7 @@ int regmap_async_complete(struct regmap *map)
|
|||
int ret;
|
||||
|
||||
/* Nothing to do with no async support */
|
||||
if (!map->bus->async_write)
|
||||
if (!map->bus || !map->bus->async_write)
|
||||
return 0;
|
||||
|
||||
trace_regmap_async_complete_start(map->dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue