Skip to content

Commit

Permalink
net: phy: dp83869: fix return of uninitialized variable ret
Browse files Browse the repository at this point in the history
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: 01db923 ("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>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Nov 19, 2019
1 parent 3132174 commit c21709e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/dp83869.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c21709e

Please sign in to comment.