aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2022-09-02 16:59:15 +0200
committerGreg Kroah-Hartman <[email protected]>2022-09-05 13:02:34 +0200
commitdec9b2f1e0455a151a7293c367da22ab973f713e (patch)
tree7ecf28aed34bca97422e7db5b22a41b175cc797f /drivers/fpga/fpga-mgr.c
parent5666a274a6d54372d6b79b1f78682a9d827e679e (diff)
debugfs: add debugfs_lookup_and_remove()
There is a very common pattern of using debugfs_remove(debufs_lookup(..)) which results in a dentry leak of the dentry that was looked up. Instead of having to open-code the correct pattern of calling dput() on the dentry, create debugfs_lookup_and_remove() to handle this pattern automatically and properly without any memory leaks. Cc: stable <[email protected]> Reported-by: Kuyo Chang <[email protected]> Tested-by: Kuyo Chang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions