]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: max77693: Fix use of uninitialized regulator config
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 3 Nov 2014 14:07:05 +0000 (15:07 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 3 Nov 2014 14:36:02 +0000 (14:36 +0000)
commita30fe72fce886000f26872cd2e06e6ef88c33199
treec76c7b2f6da2e3cf76e32397daa9cd6bed826470
parentcf707b7b48540e4559958bc7587fb506b5c80cc1
regulator: max77693: Fix use of uninitialized regulator config

Driver allocated on stack struct regulator_config but didn't initialize
it fully. Few fields (driver_data, ena_gpio) were left untouched. This
lead to using random ena_gpio values as GPIOs for max77693 regulators.

On occasion these values could match real GPIO numbers leading to
interfering with other drivers and to unsuccessful enable/disable of
regulator.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: 83b3aeef2734 ("regulator: max77693: Add max77693 regualtor driver.")
Cc: <stable@vger.kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max77693.c