From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-patch1-20260217170419.236739-2-Simon.Richter@hogyros.de> (raw)
In-Reply-To: <20260217170419.236739-2-Simon.Richter@hogyros.de>
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
next prev parent reply other threads:[~2026-02-17 20:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 17:04 [PATCH 0/5] bridges without VGA support Simon Richter
2026-02-17 17:04 ` [PATCH 1/5] vgaarb: pass vga_get errors to userspace Simon Richter
2026-02-17 20:47 ` Claude Code Review Bot [this message]
2026-02-17 17:04 ` [PATCH 2/5] vgaarb: pass errors from pci_set_vga_state up Simon Richter
2026-02-17 20:47 ` Claude review: " Claude Code Review Bot
2026-02-17 17:04 ` [PATCH 3/5] vgaarb: mark vga_get family as __must_check Simon Richter
2026-02-17 20:47 ` Claude review: " Claude Code Review Bot
2026-02-17 17:04 ` [PATCH 4/5] pci: check if VGA decoding was really activated Simon Richter
2026-02-17 20:47 ` Claude review: " Claude Code Review Bot
2026-02-17 17:04 ` [PATCH 5/5] pci: mark return value of pci_set_vga_state as __must_check Simon Richter
2026-02-17 20:47 ` Claude review: " Claude Code Review Bot
2026-02-17 20:47 ` Claude review: bridges without VGA support Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260217170419.236739-2-Simon.Richter@hogyros.de \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox