projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
regmap: fix kernel hang on regmap_bulk_write with zero val_count.
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
drivers
/
base
/
regmap
/
regmap.c
diff --git
a/drivers/base/regmap/regmap.c
b/drivers/base/regmap/regmap.c
index
f6cff3b
..
2f9a3d8
100644
(file)
--- a/
drivers/base/regmap/regmap.c
+++ b/
drivers/base/regmap/regmap.c
@@
-1557,8
+1557,10
@@
int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
} else {
void *wval;
- if (!val_count)
- return -EINVAL;
+ if (!val_count) {
+ ret = -EINVAL;
+ goto out;
+ }
wval = kmemdup(val, val_count * val_bytes, GFP_KERNEL);
if (!wval) {