[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1553696147-32633-1-git-send-email-srinath.mannam@broadcom.com>
Date: Wed, 27 Mar 2019 19:45:47 +0530
From: Srinath Mannam <srinath.mannam@...adcom.com>
To: Kishon Vijay Abraham I <kishon@...com>,
Florian Fainelli <florian.fainelli@...adcom.com>
Cc: linux-kernel@...r.kernel.org,
Srinath Mannam <srinath.mannam@...adcom.com>
Subject: [PATCH] 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 <lkp@...el.com>
Signed-off-by: Srinath Mannam <srinath.mannam@...adcom.com>
---
drivers/phy/broadcom/phy-bcm-sr-usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c
index bfe8237..fe6c589 100644
--- a/drivers/phy/broadcom/phy-bcm-sr-usb.c
+++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c
@@ -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);
--
2.7.4
Powered by blists - more mailing lists