mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-26 18:16:26 +00:00
regmap: Make regmap_noinc_read() return -ENOTSUPP if map->read isn't set
Before adding support to define bulk read/write callbacks in regmap_config by the commitd77e745613("regmap: Add bulk read/write callbacks into regmap_config"), the regmap_noinc_read() function returned an errno early a map->bus->read callback wasn't set. But that commit dropped the check and now a call to _regmap_raw_read() is attempted even when bulk read operations are not supported. That function checks for map->read anyways but there's no point to continue if the read can't succeed. Also is a fragile assumption to make so is better to make it fail earlier. Fixes:d77e745613("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20220616073435.1988219-3-javierm@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5ac01e023a
commit
f6e5c3850d
1 changed files with 3 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue