Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: ab8500: Decrement the power supply's device reference counter

Use power_supply_put() to decrement the power supply's device reference
counter.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Sebastian Reichel
6ff9d25b 1a8dbe6f

+2
+2
drivers/mfd/ab8500-sysctrl.c
··· 51 51 52 52 ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_ONLINE, 53 53 &val); 54 + power_supply_put(psy); 54 55 55 56 if (!ret && val.intval) { 56 57 charger_present = true; ··· 74 73 pss[i]); 75 74 machine_restart("charging"); 76 75 } 76 + power_supply_put(psy); 77 77 } 78 78 79 79 shutdown: