Skip to content

Commit d410912

Browse files
Tang Binfelipebalbi
authored andcommitted
usb: phy: tegra: Fix unnecessary check in tegra_usb_phy_probe()
In the function tegra_usb_phy_probe(), if usb_add_phy_dev() failed, the return value will be given to err, and if usb_add_phy_dev() succeed, the return value will be zero. Thus it is unnecessary to repeated check here. Signed-off-by: Zhang Shengju <[email protected]> Signed-off-by: Tang Bin <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 2655971 commit d410912

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/usb/phy/phy-tegra-usb.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,11 +1199,7 @@ static int tegra_usb_phy_probe(struct platform_device *pdev)
11991199

12001200
platform_set_drvdata(pdev, tegra_phy);
12011201

1202-
err = usb_add_phy_dev(&tegra_phy->u_phy);
1203-
if (err)
1204-
return err;
1205-
1206-
return 0;
1202+
return usb_add_phy_dev(&tegra_phy->u_phy);
12071203
}
12081204

12091205
static int tegra_usb_phy_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)