linux/drivers/staging
Greg Kroah-Hartman 04f3cda40e staging: pi433: fix memory leak with using debugfs_lookup()
[ Upstream commit 2f36e789e5 ]

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.  This requires saving off the root directory dentry to make
creation of individual device subdirectories easier.

Cc: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Sidong Yang <realwakka@gmail.com>
Cc: Liu Shixin <liushixin2@huawei.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230202141138.2291946-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:55:36 +01:00
..
axis-fifo
board
emxx_udc staging: emxx_udc: Add checks for dma_alloc_coherent() 2023-03-11 13:55:34 +01:00
fbtft
fieldbus
gdm724x
greybus
iio
ks7010
media media: atomisp: Only set default_run_mode on first open of a stream/asd 2023-03-10 09:33:44 +01:00
most
nvec
octeon
olpc_dcon
pi433 staging: pi433: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:36 +01:00
qlge
r8188eu
rtl8192e
rtl8192u
rtl8712
rtl8723bs
rts5208
sm750fb
vc04_services staging: vchiq_arm: fix enum vchiq_status return types 2023-01-24 07:24:35 +01:00
vme_user
vt6655
vt6656
wlan-ng
Kconfig
Makefile