From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: host1x: Fix device reference leak in host1x_device_parse_dt() error path Date: Mon, 13 Apr 2026 19:07:35 +1000 Message-ID: In-Reply-To: <20260412122633.2487800-1-lgs201920130244@gmail.com> References: <20260412122633.2487800-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: gpu: host1x: Fix device reference leak in host1x_device_parse_dt()= error path Author: Guangshuo Li Patches: 1 Reviewed: 2026-04-13T19:07:35.144042 --- This is a single-patch series that fixes a legitimate device reference leak= in the host1x driver. The analysis is correct: after `device_initialize()`= is called, the proper way to free the device is through `put_device()`, no= t `kfree()`. The fix itself is sound =E2=80=94 `put_device()` will invoke `= host1x_device_release()`, which calls `__host1x_device_del()` and then `kfr= ee()`. The release path is safe in this context: `__host1x_device_del()` iterates = `device->active` (empty at this point since no clients have been registered= ), `device->subdevs` (may contain entries added by `host1x_device_parse_dt(= )` before it failed =E2=80=94 these get properly cleaned up via `host1x_sub= dev_del()`), `device->clients` (empty), and calls `list_del_init(&device->l= ist)` (safe since `INIT_LIST_HEAD` was called). So `put_device()` correctly= tears down any partial state that `host1x_device_parse_dt()` may have buil= t up. **Verdict: The patch is correct and suitable for merging.** --- --- Generated by Claude Code Patch Reviewer