aboutsummaryrefslogtreecommitdiff
path: root/fs/ramfs/file-mmu.c
diff options
context:
space:
mode:
authorNishka Dasgupta <[email protected]>2019-07-24 13:54:12 +0530
committerLorenzo Pieralisi <[email protected]>2019-08-12 11:36:18 +0100
commit9e38e690ace3e7a22a81fc02652fc101efb340cf (patch)
tree25f84d035b60767ee58a466fc13fe9d02d043749 /fs/ramfs/file-mmu.c
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
PCI: tegra: Fix OF node reference leak
Each iteration of for_each_child_of_node() executes of_node_put() on the previous node, but in some return paths in the middle of the loop of_node_put() is missing thus causing a reference leak. Hence stash these mid-loop return values in a variable 'err' and add a new label err_node_put which executes of_node_put() on the previous node and returns 'err' on failure. Change mid-loop return statements to point to jump to this label to fix the reference leak. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <[email protected]> [[email protected]: rewrote commit log] Signed-off-by: Lorenzo Pieralisi <[email protected]>
Diffstat (limited to 'fs/ramfs/file-mmu.c')
0 files changed, 0 insertions, 0 deletions