From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: vgaarb: pass vga_get errors to userspace Date: Wed, 18 Feb 2026 06:47:57 +1000 Message-ID: In-Reply-To: <20260217170419.236739-2-Simon.Richter@hogyros.de> References: <20260217170419.236739-1-Simon.Richter@hogyros.de> <20260217170419.236739-2-Simon.Richter@hogyros.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This patch makes the `vga_arb_write` handler check the return value of `vga_get_uninterruptible` and return the error to userspace instead of silently proceeding. > + int err; > int ret_val; > int i; Minor style note: the blank line between `err` and `ret_val` is odd -- these are related local variables and would normally be declared together. > + err = vga_get_uninterruptible(pdev, io_state); > + if (unlikely(err)) > + { > + ret_val = err; > + goto done; > + } The opening brace should be on the same line as the `if`, per kernel coding style (`if (unlikely(err)) {`). This pattern appears in multiple patches in the series. Functionally this patch is correct -- prior to this series `vga_get_uninterruptible` could already return `-ENODEV` or `-ERESTARTSYS`, so checking the return value here fixes a pre-existing bug where the "lock" command would report success to userspace even when `vga_get` failed, and would then call `vga_put` on a resource that was never acquired (via the lock counter update that follows). So this is a good fix. --- Generated by Claude Code Patch Reviewer