* [PATCH] phy: sr-usb: fix build warning
@ 2019-03-27 14:15 Srinath Mannam
0 siblings, 0 replies; only message in thread
From: Srinath Mannam @ 2019-03-27 14:15 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Florian Fainelli; +Cc: linux-kernel, Srinath Mannam
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@intel.com>
Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-27 14:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 14:15 [PATCH] phy: sr-usb: fix build warning Srinath Mannam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.