From: Charles Keepax Date: Thu, 22 Feb 2018 12:59:11 +0000 (+0000) Subject: regmap: Remove unnecessary printk for failed allocation X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b4ecfec5ee3f282a4ac0876de332876fec9b488c;p=linux.git regmap: Remove unnecessary printk for failed allocation Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 8fe6e08fa41ee..707b0450ad720 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -2050,10 +2050,9 @@ out: 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);