diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 63e30ef096e2..9596f3048939 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, | |||
1615 | size_t pair_size = reg_bytes + pad_bytes + val_bytes; | 1615 | size_t pair_size = reg_bytes + pad_bytes + val_bytes; |
1616 | size_t len = pair_size * num_regs; | 1616 | size_t len = pair_size * num_regs; |
1617 | 1617 | ||
1618 | if (!len) | ||
1619 | return -EINVAL; | ||
1620 | |||
1618 | buf = kzalloc(len, GFP_KERNEL); | 1621 | buf = kzalloc(len, GFP_KERNEL); |
1619 | if (!buf) | 1622 | if (!buf) |
1620 | return -ENOMEM; | 1623 | return -ENOMEM; |