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/ras: Cancel and free message on get counter failure Date: Thu, 04 Jun 2026 13:22:00 +1000 Message-ID: In-Reply-To: <20260602044919.702209-2-raag.jadav@intel.com> References: <20260602044919.702209-1-raag.jadav@intel.com> <20260602044919.702209-2-raag.jadav@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Good fix, correct.** The original code had two issues in `doit_reply_value()`: 1. When `get_node_error_counter()` failed, `msg` (the sk_buff) and `hdr` (t= he genetlink header) were leaked. 2. The existing error handling for `msg_reply_value()` failure had its own = cleanup copy-paste. The goto-based consolidation is clean and handles the `hdr =3D=3D NULL` cas= e correctly =E2=80=94 when `genlmsg_iput()` fails, the jump goes to `free_m= sg` (skipping `genlmsg_cancel`), which is right since there's no valid head= er to cancel: ```c cancel_msg: genlmsg_cancel(msg, hdr); free_msg: nlmsg_free(msg); return ret; ``` No issues. --- --- Generated by Claude Code Patch Reviewer