From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: fbdev: tdfxfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO Date: Sun, 12 Apr 2026 11:09:30 +1000 Message-ID: In-Reply-To: <2026040913-despite-entering-a017@gregkh> References: <2026040913-despite-entering-a017@gregkh> <2026040913-despite-entering-a017@gregkh> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Commit message bug =E2=80=94 wrong driver name referenced:** The commit message says: > we also need to prevent that same crash from happening in the **udlfb** d= river as it uses pixclock directly when dividing But the patch modifies `drivers/video/fbdev/tdfxfb.c`, not `udlfb`. The sub= ject line correctly says `tdfxfb`, but the body references the wrong driver= . This is a copy-paste error from what appears to be a templated series fix= ing the same issue across multiple fbdev drivers. Should be fixed before me= rging. **Code change is correct:** ```c + if (!var->pixclock) + return -EINVAL; + if (PICOS2KHZ(var->pixclock) > par->max_pixclock) { ``` This is the right fix. The guard is placed immediately before the first `PI= COS2KHZ(var->pixclock)` call in `tdfxfb_check_var()`, which would divide by= zero. Returning `-EINVAL` is the appropriate error code, consistent with o= ther validation failures in the same function. **Coverage note:** There is a second use of `PICOS2KHZ(info->var.pixclock)`= at line 565 in `tdfxfb_set_par()`, but that call path goes through `tdfxfb= _check_var()` first (the fbdev core calls `check_var` before `set_par`), so= the guard here protects both sites. **Minor:** The `Assisted-by: gregkh_clanker_t1000` tag is non-standard =E2= =80=94 the kernel typically uses `Co-developed-by:` or similar recognized t= ags. Not a blocking issue but worth noting. **Verdict:** The fix is correct and appropriate for stable. The commit mess= age should be fixed to say "tdfxfb" instead of "udlfb" before applying. --- Generated by Claude Code Patch Reviewer