Skip to content

Commit f21b9be

Browse files
jhovoldvinodkoul
authored andcommitted
phy: phy-snps-eusb2: fix optional phy lookup parameter
The devm_of_phy_optional_get() takes an optional name argument as its third parameter and not an index like the recently replaced devm_of_phy_get_by_index(). Replace 0 with an explicit NULL for consistency and readability. Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent b7996f8 commit f21b9be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/phy/phy-snps-eusb2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
581581
return dev_err_probe(dev, ret,
582582
"failed to get regulator supplies\n");
583583

584-
phy->repeater = devm_of_phy_optional_get(dev, np, 0);
584+
phy->repeater = devm_of_phy_optional_get(dev, np, NULL);
585585
if (IS_ERR(phy->repeater))
586586
return dev_err_probe(dev, PTR_ERR(phy->repeater),
587587
"failed to get repeater\n");

0 commit comments

Comments
 (0)