mbox series

[v4,0/3] drm/tests: Fix some memory leaks

Message ID 20241030023504.530425-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series drm/tests: Fix some memory leaks | expand

Message

Jinjie Ruan Oct. 30, 2024, 2:35 a.m. UTC
Fix some memory leaks in drm tests.

Changes in v4:
- Return NULL early if drm_display_mode_from_cea_vic() return NULL
  for drm_kunit_display_mode_from_cea_vic() helper as Maxime suggested.
- Split out the separate ttm test patch.

Changes in v3:
- Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
- Drop the "helper" in the helper name.
- s/fllowing/following/
- Add Acked-by.

Changes in v2:
- Fix it with new introduced helper instead of drm_mode_destroy().
- Update the commit message.
- Add Reviewed-by.

Jinjie Ruan (3):
  drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()
  drm/connector: hdmi: Fix memory leak in
    drm_display_mode_from_cea_vic()
  drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()

 drivers/gpu/drm/tests/drm_connector_test.c    | 24 +++++------
 .../drm/tests/drm_hdmi_state_helper_test.c    |  8 ++--
 drivers/gpu/drm/tests/drm_kunit_helpers.c     | 42 +++++++++++++++++++
 include/drm/drm_kunit_helpers.h               |  4 ++
 4 files changed, 62 insertions(+), 16 deletions(-)

Comments

Maxime Ripard Oct. 31, 2024, 9:34 a.m. UTC | #1
On Wed, 30 Oct 2024 10:35:01 +0800, Jinjie Ruan wrote:
> Fix some memory leaks in drm tests.
> 
> Changes in v4:
> - Return NULL early if drm_display_mode_from_cea_vic() return NULL
>   for drm_kunit_display_mode_from_cea_vic() helper as Maxime suggested.
> - Split out the separate ttm test patch.
> 
> [...]

Applied to misc/kernel.git (drm-misc-fixes).

Thanks!
Maxime