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: drm_bridge_get/put(): ignore ERR_PTR Date: Tue, 05 May 2026 08:26:08 +1000 Message-ID: In-Reply-To: <20260504-drm-bridge-alloc-getput-panel_or_bridge-v4-1-b578c3daaf10@bootlin.com> References: <20260504-drm-bridge-alloc-getput-panel_or_bridge-v4-0-b578c3daaf10@bootlin.com> <20260504-drm-bridge-alloc-getput-panel_or_bridge-v4-1-b578c3daaf10@bootlin.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Status: Good** Clean, minimal change. Switches the NULL guard to `IS_ERR_OR_NULL()` in both `drm_bridge_get()` and `drm_bridge_put()`, matching the pattern used by `kfree()` and similar kernel APIs. This is a prerequisite for the new API returning ERR_PTR on failure. ```c - if (bridge) + if (!IS_ERR_OR_NULL(bridge)) kref_get(&bridge->refcount); ``` The existing `DEFINE_FREE(drm_bridge_put, struct drm_bridge *, if (_T) drm_bridge_put(_T))` in drm_bridge.h uses `if (_T)` (NULL-only check), but this is fine: for ERR_PTR values `_T` is non-NULL, so `drm_bridge_put()` is called, and after this patch it will safely bail out via `IS_ERR_OR_NULL`. No issue here, just noting the interaction. Reviewed-by tags and Suggested-by are appropriate. --- Generated by Claude Code Patch Reviewer