1
0
Fork 0
freescale-linux-fslc/drivers/base/regmap
Meng Li eb949f8912 regmap: set debugfs_name to NULL after it is freed
[ Upstream commit e41a962f82 ]

There is a upstream commit cffa4b2122f5("regmap:debugfs:
Fix a memory leak when calling regmap_attach_dev") that
adds a if condition when create name for debugfs_name.
With below function invoking logical, debugfs_name is
freed in regmap_debugfs_exit(), but it is not created again
because of the if condition introduced by above commit.
regmap_reinit_cache()
	regmap_debugfs_exit()
	...
	regmap_debugfs_init()
So, set debugfs_name to NULL after it is freed.

Fixes: cffa4b2122 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev")
Signed-off-by: Meng Li <Meng.Li@windriver.com>
Link: https://lore.kernel.org/r/20210226021737.7690-1-Meng.Li@windriver.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:09 +02:00
..
Kconfig regmap: add Intel SPI Slave to AVMM Bus Bridge support 2020-08-26 19:46:38 +01:00
Makefile regmap: add Intel SPI Slave to AVMM Bus Bridge support 2020-08-26 19:46:38 +01:00
internal.h Merge remote-tracking branch 'regmap/for-5.10' into regmap-next 2020-10-05 18:53:24 +01:00
regcache-flat.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regcache-lzo.c regmap: lzo: Switch to bitmap_zalloc() 2019-06-17 15:18:44 +01:00
regcache-rbtree.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regcache.c regmap: fix page selection for noinc writes 2020-09-21 20:58:02 +01:00
regmap-ac97.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regmap-debugfs.c regmap: set debugfs_name to NULL after it is freed 2021-05-14 09:50:09 +02:00
regmap-i2c.c regmap-i2c: add 16-bit width registers support 2020-04-24 14:32:07 +01:00
regmap-i3c.c regmap: add i3c bus support 2019-06-07 13:09:55 +01:00
regmap-irq.c regmap: irq: Add support to clear ack registers 2020-10-05 18:35:30 +01:00
regmap-mmio.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regmap-sccb.c regmap: sccb: fix typo and sort headers alphabetically 2018-07-23 18:05:08 +01:00
regmap-sdw.c regmap: sdw: use _no_pm functions in regmap_read/write 2021-03-04 11:38:15 +01:00
regmap-slimbus.c regmap: slimbus: add support to multi read/write 2018-07-11 11:58:04 +01:00
regmap-spi-avmm.c regmap: add Intel SPI Slave to AVMM Bus Bridge support 2020-08-26 19:46:38 +01:00
regmap-spi.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regmap-spmi.c regmap: add proper SPDX identifiers on files that did not have them. 2019-04-25 20:22:15 +01:00
regmap-w1.c regmap: regmap-w1: Drop unreachable code 2019-11-19 13:09:20 +00:00
regmap.c Merge remote-tracking branch 'regmap/for-5.10' into regmap-next 2020-10-05 18:53:24 +01:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00