From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: misc: fastrpc: Allow fastrpc_buf_free() to accept NULL Date: Sat, 16 May 2026 09:09:55 +1000 Message-ID: In-Reply-To: <20260515124217.20723-6-jianping.li@oss.qualcomm.com> References: <20260515124217.20723-1-jianping.li@oss.qualcomm.com> <20260515124217.20723-6-jianping.li@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Verdict: Looks good.** Clean kernel-convention cleanup. Making `fastrpc_buf_free()` NULL-safe like `kfree()`: ```c + if (!buf) + return; ``` And removing the now-redundant NULL checks in callers: ```c - if (ctx->buf) - fastrpc_buf_free(ctx->buf); + fastrpc_buf_free(ctx->buf); ``` No functional change. This is a nice hardening that follows established kernel patterns (cf. `kfree`, `vfree`, `dma_free_coherent` on newer kernels, etc.). --- Generated by Claude Code Patch Reviewer