Files
twx-linux/drivers/base/regmap
Richard Fitzgerald 9a3f1490f9 regmap: kunit: Fix memory leaks in gen_regmap() and gen_raw_regmap()
[ Upstream commit c3820641da ]

- Use kunit_kcalloc() to allocate the defaults table so that it will be
  freed when the test case ends.
- kfree() the buf and *data buffers on the error paths.
- Use kunit_add_action_or_reset() instead of kunit_add_action() so that
  if it fails it will call regmap_exit().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240411103724.54063-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-14 15:34:05 +02:00
..
2024-04-08 14:09:58 +01:00