[PATCH] regmap: Remove unnecessary printk for failed allocation
From: Charles Keepax
Date: Thu Feb 22 2018 - 07:59:11 EST
Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
drivers/base/regmap/regmap.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 8fe6e08fa41e..707b0450ad72 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2050,10 +2050,9 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
return -EINVAL;
wval = kmemdup(val, val_count * val_bytes, map->alloc_flags);
- if (!wval) {
- dev_err(map->dev, "Error in memory allocation\n");
+ if (!wval)
return -ENOMEM;
- }
+
for (i = 0; i < val_count * val_bytes; i += val_bytes)
map->format.parse_inplace(wval + i);
--
2.16.1