Skip to content

Commit

Permalink
Merge remote-tracking branch 'regmap/topic/core' into regmap-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Jan 12, 2018
2 parents b2cd1df + 4c90f29 commit 86e41a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2423,13 +2423,15 @@ static int _regmap_bus_read(void *context, unsigned int reg,
{
int ret;
struct regmap *map = context;
void *work_val = map->work_buf + map->format.reg_bytes +
map->format.pad_bytes;

if (!map->format.parse_val)
return -EINVAL;

ret = _regmap_raw_read(map, reg, map->work_buf, map->format.val_bytes);
ret = _regmap_raw_read(map, reg, work_val, map->format.val_bytes);
if (ret == 0)
*val = map->format.parse_val(map->work_buf);
*val = map->format.parse_val(work_val);

return ret;
}
Expand Down

0 comments on commit 86e41a2

Please sign in to comment.