diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 2dfd6aa60..a3c408660 100755 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1796,7 +1796,7 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg, map->format.reg_bytes + map->format.pad_bytes + val_len); - else if (map->bus->gather_write) + else if (map->bus && map->bus->gather_write) ret = map->bus->gather_write(map->bus_context, map->work_buf, map->format.reg_bytes + map->format.pad_bytes,