linux/drivers/staging
Greg Kroah-Hartman bb16f31026 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>
History 2023-03-11 13:50:42 +01:00
..
axis-fifo staging: axis-fifo: Use platform_get_irq() to get the interrupt 2021-12-30 11:54:56 +01:00
board staging: board: Fix uninitialized spinlock when attaching genpd 2021-07-21 11:22:15 +02:00
emxx_udc staging: emxx_udc: Add checks for dma_alloc_coherent() 2023-03-11 13:50:40 +01:00
fbtft staging: fbtft: core: set smem_len before fb_deferred_io_init call 2022-07-28 10:42:42 +02:00
fieldbus staging: fieldbus: use sysfs_emit() in show functions 2022-11-09 14:40:13 +01:00
gdm724x staging: gdm724x: Replace macro GDM_TTY_READY with static inline function 2022-11-22 13:20:16 +01:00
greybus staging: greybus: loopback_test: Remove extra blank lines 2022-12-05 13:28:41 +01:00
iio staging: iio: accel: adis16240: Call '__adis_initial_startup()' 2022-11-23 20:37:51 +00:00
ks7010 staging: ks7010: Avoid clashing function prototypes 2022-11-09 14:39:03 +01:00
media media: atomisp: Only set default_run_mode on first open of a stream/asd 2023-03-10 09:29:03 +01:00
most staging: most: i2c: Convert to i2c's .probe_new() 2022-11-22 13:23:25 +01:00
nvec Staging: nvec: Fix ending in '(' error 2022-02-08 10:46:01 +01:00
octeon staging: octeon: cvmx_ptr_to_phys() should return physaddr_t 2022-11-02 08:21:49 +01:00
olpc_dcon staging: olpc_dcon: Convert to i2c's .probe_new() 2022-11-22 13:23:25 +01:00
pi433 staging: pi433: fix memory leak with using debugfs_lookup() 2023-03-11 13:50:42 +01:00
qlge net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
r8188eu staging: r8188eu: use subtype helper in rtw_check_bcn_info 2022-12-05 13:29:32 +01:00
rtl8192e Staging driver changes for 6.2-rc1 2022-12-16 03:27:03 -08:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2022-12-05 13:24:50 +01:00
rtl8712 staging: rtl8712: fix potential memory leak 2022-10-31 09:08:30 +01:00
rtl8723bs staging: rtl8723bs: replace underutilized struct by array variable 2022-11-08 16:26:49 +01:00
rts5208 staging: rts5208: split long line of code 2022-10-20 17:06:17 +02:00
sm750fb Staging driver changes for 6.2-rc1 2022-12-16 03:27:03 -08:00
vc04_services staging: vchiq_arm: fix enum vchiq_status return types 2023-01-17 19:23:36 +01:00
vme_user vme: Use root_device_register() not underlined version 2022-12-08 17:00:18 +01:00
vt6655 Staging driver changes for 6.2-rc1 2022-12-16 03:27:03 -08:00
vt6656 wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
wlan-ng treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
Kconfig Here's the main clk pull request for this merge window. We have some 2022-10-08 10:06:48 -07:00
Makefile Here's the main clk pull request for this merge window. We have some 2022-10-08 10:06:48 -07:00