]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mfd: max77686: Fix regmap resource leak on driver remove
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fri, 20 Dec 2013 09:35:07 +0000 (10:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Feb 2014 19:34:02 +0000 (11:34 -0800)
commiteef2dc201d71a3dd199b6d00f00965803a4c730c
tree3806ca32ce426e5c98339ed89dfbdc4464e3dd79
parentc73c940dd8716c88e72248f0b286f1ea1a59a81a
mfd: max77686: Fix regmap resource leak on driver remove

commit 74142ffc0b52cfe6f9d2f6f34a5f3eedbfe3ce51 upstream.

The regmap used by max77686 MFD driver was not freed with regmap_exit()
on driver exit. This lead to leak of resources.

Replace regmap_init_i2c() call in driver probe with initialization of
managed register map so the regmap will be properly freed by the device
management code.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/max77686.c