]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Correct return value check in regulator_resolve_supply
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thu, 17 Sep 2015 13:50:20 +0000 (14:50 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2015 17:39:56 +0000 (18:39 +0100)
commit9c58981642a6c1aed8cdcea14acdfdfbf783249b
treef50c03c0ba49f90d6ad8ca9d3ef6c90c68768c3f
parent6795ca3f6367e9feb8e944ae66903a50fdc8d44d
regulator: core: Correct return value check in regulator_resolve_supply

The ret pointer passed to regulator_dev_lookup is only filled with a
valid error code if regulator_dev_lookup returned NULL. Currently
regulator_resolve_supply checks this ret value before it checks if a
regulator was returned, this can result in valid regulator lookups being
ignored.

Fixes: 759afcee20b1 ("regulator: Defer lookup of supply to regulator_get")
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
drivers/regulator/core.c