Re: [PATCH] phy: realtek: usb: fix the USB 2.0 PHY's port range check
From: Manivannan Sadhasivam
Date: Fri Nov 27 2026 - 06:38:06 EST
On 2026-11-04 11:14 +1300, Joshua Scott wrote:
> rtk_phy_toggle() checks the port number before using it to index the
> phy_parameter array, which has num_phy entries. Ports are numbered from
> zero, so the check should reject port == num_phy, but it only rejects
> ports greater than num_phy. Fix the off-by-one.
>
> Found by code inspection.
>
> Fixes: eeda494542e5 ("phy: realtek: usb: add new driver for the Realtek RTD SoC USB 2.0 PHY")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Joshua Scott <joshua.scott@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
- Mani