]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:03:07 +0000 (19:03 +0100)
commit7f7ae192a6d6472d06a2d5a05daba04ce9facc43
treef7fb5ac275052d11b4a8093e1afa719e85062f9c
parent8f9363f79d0b7cfb70f2dcec99719f6a53359d97
regulator: max77693: Fix use of uninitialized regulator config

commit ca0c37a0b489bb14bf3e1549e7a8d0c9a17f4919 upstream.

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: 80b022e29bfd ("regulator: max77693: Add max77693 regualtor driver.")
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/regulator/max77693.c