Skip to content

Commit 5c36b86

Browse files
geertubroonie
authored andcommitted
regmap: Remove superfluous check for !config in __regmap_init()
The first thing __regmap_init() do is check if config is non-NULL, so there is no need to check for this again later. Fixes: d77e745 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/a154d9db0f290dda96b48bd817eb743773e846e1.1755090330.git.geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 886f42c commit 5c36b86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/base/regmap/regmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ struct regmap *__regmap_init(struct device *dev,
827827
map->read_flag_mask = bus->read_flag_mask;
828828
}
829829

830-
if (config && config->read && config->write) {
830+
if (config->read && config->write) {
831831
map->reg_read = _regmap_bus_read;
832832
if (config->reg_update_bits)
833833
map->reg_update_bits = config->reg_update_bits;

0 commit comments

Comments
 (0)