Skip to content

Commit

Permalink
net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe()
Browse files Browse the repository at this point in the history
The "priv->phy_interface" variable is an enum and in this context GCC
will treat it as unsigned so the error handling will never be
triggered.

Fixes: 80105be ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Sep 27, 2019
1 parent 002dfe8 commit 25a5849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)

priv->phy_interface = of_get_phy_mode(dn);
/* Default to GMII interface mode */
if (priv->phy_interface < 0)
if ((int)priv->phy_interface < 0)
priv->phy_interface = PHY_INTERFACE_MODE_GMII;

/* In the case of a fixed PHY, the DT node associated
Expand Down

0 comments on commit 25a5849

Please sign in to comment.