Signed-off-by: Charles Keepax <ckee...@opensource.cirrus.com>
---
 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 8a6de76f89bb..c84c4d5d2df7 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2052,10 +2052,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.11.0

Reply via email to