summaryrefslogtreecommitdiff
path: root/block/blk-flush.c
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-08 12:59:37 +0530
committerKishon Vijay Abraham I <kishon@ti.com>2019-08-26 17:20:02 +0530
commitbe0345b2cc1f3e6044409b274c61bc44d59f640d (patch)
treefd378e67bec89e9293a4800be550baa3920286ad /block/blk-flush.c
parente6839c31a608e79f2057fab987dd814f5d3477e6 (diff)
phy: qualcomm: phy-qcom-qmp: Add of_node_put() before return
Each iteration of for_each_available_child_of_node() puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence create a new label, err_node_put, that puts the previous node (child) before returning the required value. Also include the statement pm_runtime_disable() under this label in order to avoid repetition among mid-loop return conditions. Edit the mid-loop return statements to instead go to this new label err_node_put. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'block/blk-flush.c')
0 files changed, 0 insertions, 0 deletions