diff options
author | Wen Yang <wen.yang99@zte.com.cn> | 2019-04-17 10:43:03 +0800 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2019-04-17 22:19:12 +0200 |
commit | 2143bf6d7cfe74feb5694fba7e9000ddcd5fb25e (patch) | |
tree | 3ebf3c80c7d8af3a6d91214f15401311498e9a06 /Documentation/devicetree/bindings/power | |
parent | 0b646fd1b1963bf44fe81853e89f3469aeb94a6c (diff) | |
download | linux-2143bf6d7cfe74feb5694fba7e9000ddcd5fb25e.tar.gz |
power: supply: core: fix leaked of_node refs in power_supply_get_battery_info
The call to of_parse_phandle returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.
Detected by coccinelle with the following warnings:
./drivers/power/supply/power_supply_core.c:601:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
./drivers/power/supply/power_supply_core.c:604:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
./drivers/power/supply/power_supply_core.c:632:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
./drivers/power/supply/power_supply_core.c:635:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
./drivers/power/supply/power_supply_core.c:653:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
./drivers/power/supply/power_supply_core.c:664:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
./drivers/power/supply/power_supply_core.c:673:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'Documentation/devicetree/bindings/power')
0 files changed, 0 insertions, 0 deletions