mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
regmap: Check readable regs in _regmap_read
Check if regs are readable. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
676970da5c
commit
d4807ad2c4
@ -1736,6 +1736,9 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
|
||||
if (map->cache_only)
|
||||
return -EBUSY;
|
||||
|
||||
if (!regmap_readable(map, reg))
|
||||
return -EIO;
|
||||
|
||||
ret = map->reg_read(context, reg, val);
|
||||
if (ret == 0) {
|
||||
#ifdef LOG_DEVICE
|
||||
|
Loading…
x
Reference in New Issue
Block a user