public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/3]  drm: remove drm bridge in error paths
@ 2026-04-10 21:27 Osama Abdelkader
  2026-04-11 23:18 ` Claude review: " Claude Code Review Bot
  0 siblings, 1 reply; 2+ messages in thread
From: Osama Abdelkader @ 2026-04-10 21:27 UTC (permalink / raw)
  To: dri-devel, luca.ceresoli; +Cc: linux-kernel, Osama Abdelkader


remove drm bridge in error paths for sti_hda, exynos_drm_mic
and megachips-stdpxxxx-ge-b850v3-fw

After sending similar patches for sti_hdmi and chipone-icn6211
grepping for similar cases in drm drivers shows these leftovers

Osama Abdelkader (3):
  drm/sti: remove bridge when sti_hda component_add fails
  drm/exynos: remove bridge when component_add fails
  drm/bridge: megachips: remove bridge when irq request fails

 drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 6 +++++-
 drivers/gpu/drm/exynos/exynos_drm_mic.c                  | 1 +
 drivers/gpu/drm/sti/sti_hda.c                            | 6 +++++-
 3 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Claude review: drm: remove drm bridge in error paths
  2026-04-10 21:27 [PATCH 0/3] drm: remove drm bridge in error paths Osama Abdelkader
@ 2026-04-11 23:18 ` Claude Code Review Bot
  0 siblings, 0 replies; 2+ messages in thread
From: Claude Code Review Bot @ 2026-04-11 23:18 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm: remove drm bridge in error paths
Author: Osama Abdelkader <osama.abdelkader@gmail.com>
Patches: 1
Reviewed: 2026-04-12T09:18:43.745973

---

This is a 3-patch series fixing resource leaks where `drm_bridge_add()` is called during probe but `drm_bridge_remove()` is not called when a subsequent operation in the probe path fails. All three bugs are real and follow the same pattern: bridge is added, then a later step fails, and the error path doesn't undo the bridge registration.

The fixes are small, targeted, and appropriate. The diffstat (`+11/-2`) is consistent with straightforward error-path fixups.

**One suggestion for the whole series**: all three drivers use `drm_bridge_add()` manually, but `devm_drm_bridge_add()` (available at `drm_bridge.h:1321`) exists and would handle cleanup automatically on device removal. Converting to `devm_drm_bridge_add()` would eliminate both the error-path bugs *and* the manual `drm_bridge_remove()` calls in each driver's `_remove()` function. That said, that would be a separate cleanup patch and is beyond the stated scope of this series.

**Note**: The mbox file only contained the cover letter (patch 0/3); the individual patches (1/3, 2/3, 3/3) were not included. The review below is based on analysis of the source files and the described fixes.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-11 23:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 21:27 [PATCH 0/3] drm: remove drm bridge in error paths Osama Abdelkader
2026-04-11 23:18 ` Claude review: " Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox