From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel/amdxdna: Return ERR_PTR on dma_alloc_noncoherent failure Date: Wed, 25 Mar 2026 07:38:18 +1000 Message-ID: In-Reply-To: <20260323173719.2311474-1-lizhi.hou@amd.com> References: <20260323173719.2311474-1-lizhi.hou@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: accel/amdxdna: Return ERR_PTR on dma_alloc_noncoherent failure Author: Lizhi Hou Patches: 4 Reviewed: 2026-03-25T07:38:18.945083 --- This is a single-patch bug fix for a real NULL-vs-ERR_PTR mismatch in the amdxdna driver. The fix is correct, minimal, and well-targeted. All four callers of `aie2_alloc_msg_buffer()` use `IS_ERR()` to check the return value, but the `dma_alloc_noncoherent()` path returns NULL on failure rather than an ERR_PTR. This means allocation failures on that path would slip past the error check, leading to a NULL pointer dereference. The patch properly converts the NULL to `ERR_PTR(-ENOMEM)`. **Verdict: Good patch, should be accepted.** --- Generated by Claude Code Patch Reviewer