kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup()

When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable <stable@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230202151554.2310273-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Changed files
+1 -1
kernel
+1 -1
kernel/irq/irqdomain.c
··· 1915 1915 1916 1916 static void debugfs_remove_domain_dir(struct irq_domain *d) 1917 1917 { 1918 - debugfs_remove(debugfs_lookup(d->name, domain_dir)); 1918 + debugfs_lookup_and_remove(d->name, domain_dir); 1919 1919 } 1920 1920 1921 1921 void __init irq_domain_debugfs_init(struct dentry *root)