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/vc4: platform_get_irq_byname() returns an int Date: Tue, 24 Feb 2026 10:07:38 +1000 Message-ID: In-Reply-To: <2026022339-cornflake-t-shirt-2471@gregkh> References: <2026022339-cornflake-t-shirt-2471@gregkh> <2026022339-cornflake-t-shirt-2471@gregkh> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review The original code declared the IRQ numbers as `unsigned int`: > - unsigned int hpd_con = platform_get_irq_byname(pdev, "hpd-connected"); > - unsigned int hpd_rm = platform_get_irq_byname(pdev, "hpd-removed"); `platform_get_irq_byname()` returns `int` and uses negative values for errors. Storing into `unsigned int` makes the error check impossible and passes a bogus large IRQ number to `devm_request_threaded_irq()`, which would likely fail with `-EINVAL` anyway, but with a confusing error message from the IRQ subsystem rather than a clear error from the platform lookup. The fix consolidates to a single `int hpd` variable, checking each result before use: > + int hpd = platform_get_irq_byname(pdev, "hpd-connected"); > + if (hpd < 0) > + return hpd; > ... > + hpd = platform_get_irq_byname(pdev, "hpd-removed"); > + if (hpd < 0) > + return hpd; The variable reuse is fine since the first IRQ number is fully consumed by `devm_request_threaded_irq()` before the variable is reassigned for the second lookup. The caller in `vc4_hdmi_bind()` checks the return value and jumps to `err_put_runtime_pm`, which handles cleanup correctly. No issues found. Straightforward and correct fix. --- Generated by Claude Code Patch Reviewer