[PATCH 06/10] phy: rockchip: inno-usb2: Fix improper use of UCLASS_PHY
Kever Yang
kever.yang at rock-chips.com
Sat Aug 30 18:46:37 CEST 2025
On 2025/7/22 06:07, Jonas Karlman wrote:
> The Rockchip USB2PHY glue driver improperly present itself as a
> UCLASS_PHY driver, without ever implementing the required phy_ops.
>
> This is something that in special circumstances can lead to a NULL
> pointer dereference followed by a SError crash.
>
> Change the glue driver to use UCLASS_NOP to fix this.
>
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
Thanks,
- Kever
> ---
> drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> index 88b33de1b2a0..d6ce12b5e83d 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> @@ -538,7 +538,7 @@ U_BOOT_DRIVER(rockchip_usb2phy_clock) = {
>
> U_BOOT_DRIVER(rockchip_usb2phy) = {
> .name = "rockchip_usb2phy",
> - .id = UCLASS_PHY,
> + .id = UCLASS_NOP,
> .of_match = rockchip_usb2phy_ids,
> .probe = rockchip_usb2phy_probe,
> .bind = rockchip_usb2phy_bind,
More information about the U-Boot
mailing list