From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/bridge: samsung-dsim: fix TE GPIO ownership Date: Fri, 05 Jun 2026 06:32:39 +1000 Message-ID: In-Reply-To: <20260604114604.1422184-1-lgs201920130244@gmail.com> References: <20260604114604.1422184-1-lgs201920130244@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/bridge: samsung-dsim: fix TE GPIO ownership Author: Guangshuo Li Patches: 1 Reviewed: 2026-06-05T06:32:39.803290 --- This is a single-patch fix for a real resource management bug in the Samsun= g DSIM bridge driver. The analysis in the commit message is correct: `devm_= gpiod_get_optional()` registers a devres cleanup action that will call `gpi= od_put()` automatically on device detach, but the driver also manually call= s `gpiod_put()` in both the error path of `samsung_dsim_register_te_irq()` = and in `samsung_dsim_unregister_te_irq()`. This results in a double-free of= the GPIO descriptor =E2=80=94 once via the manual `gpiod_put()` and again = when devres runs during device detach. The fix is correct and minimal: switch to non-managed `gpiod_get_optional()= ` so that the manual `gpiod_put()` calls are the sole owners of the descrip= tor's lifetime. The addition of `dsi->te_gpio =3D NULL` after each `gpiod_p= ut()` is a good defensive practice. **Verdict: Looks good. Correct fix for a genuine double-free bug.** --- Generated by Claude Code Patch Reviewer