diff options
author | Mark Brown <broonie@linaro.org> | 2014-06-02 17:07:38 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-02 17:07:38 +0100 |
commit | e6353328eeb7874bb5a98e226237098a8f475232 (patch) | |
tree | ed20cab6a40758c58d0a01115ee71e81758a3eb7 /drivers/base/regmap/regmap.c | |
parent | fad01e866afdbe01a1f3ec06a39c3a8b9e197014 (diff) | |
parent | 2e804b7c72d4efd2318428a2c1e40fd0e173c487 (diff) | |
download | blackbird-op-linux-e6353328eeb7874bb5a98e226237098a8f475232.tar.gz blackbird-op-linux-e6353328eeb7874bb5a98e226237098a8f475232.zip |
Merge remote-tracking branch 'regmap/topic/core' into regmap-next
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r-- | drivers/base/regmap/regmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 63e30ef096e2..35869755d464 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1615,6 +1615,9 @@ static int _regmap_raw_multi_reg_write(struct regmap *map, size_t pair_size = reg_bytes + pad_bytes + val_bytes; size_t len = pair_size * num_regs; + if (!len) + return -EINVAL; + buf = kzalloc(len, GFP_KERNEL); if (!buf) return -ENOMEM; @@ -1662,7 +1665,7 @@ static int _regmap_range_multi_paged_reg_write(struct regmap *map, int ret; int i, n; struct reg_default *base; - unsigned int this_page; + unsigned int this_page = 0; /* * the set of registers are not neccessarily in order, but * since the order of write must be preserved this algorithm |