aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-11-18 11:48:35 +0000
committerDavid S. Miller <davem@davemloft.net>2019-11-18 17:23:44 -0800
commitc21709e744b482baab544a893a3a1a9370d51850 (patch)
tree9c3a9adfb916240b05f3cd61013b1760221ea137 /drivers/net/phy
parentlwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER (diff)
downloadlinux-dev-c21709e744b482baab544a893a3a1a9370d51850.tar.xz
linux-dev-c21709e744b482baab544a893a3a1a9370d51850.zip
net: phy: dp83869: fix return of uninitialized variable ret
In the case where the call to phy_interface_is_rgmii returns zero the variable ret is left uninitialized and this is returned at the end of the function dp83869_configure_rgmii. Fix this by returning 0 instead of the uninitialized value in ret. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/dp83869.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c
index fcd418716c10..1c7a7c57dec3 100644
--- a/drivers/net/phy/dp83869.c
+++ b/drivers/net/phy/dp83869.c
@@ -239,7 +239,7 @@ static int dp83869_configure_rgmii(struct phy_device *phydev,
dp83869->io_impedance &
DP83869_IO_MUX_CFG_IO_IMPEDANCE_CTRL);
- return ret;
+ return 0;
}
static int dp83869_configure_mode(struct phy_device *phydev,