phy: sr-usb: fix build warning
PATCH 1/1 phy: sr-usb: fix build warning
Add invalid version check to fix below warning reported for stingray usb phy driver.
The kbuild robot reports:
drivers/phy/broadcom/phy-bcm-sr-usb.c: In function 'bcm_usb_phy_probe':
warning: 'phy_cfg' may be used uninitialized in this function
Fixes a3b96057577 (phy: sr-usb: Add Stingray USB PHY driver)
Reported-by kbuild test robot <[email protected]>
Signed-off-by Srinath Mannam <[email protected]>
--- drivers/phy/broadcom/phy-bcm-sr-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/broadcom/phy-bcm-sr-usb.c +2 -1
@@ -328,7 +328,8 @@ static int bcm_usb_phy_create(struct device *dev, struct device_node *node,return PTR_ERR (phy_cfg->phy);phy_set_drvdata (phy_cfg->phy, phy_cfg); - } + }else +return -ENODEV ;dev_set_drvdata (dev, phy_cfg);
Signature · 1 line
2.7.4