netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] amd-xgbe: Signedness bug in xgbe_phy_link_status()
@ 2016-11-17 10:59 Dan Carpenter
  2016-11-17 14:40 ` Tom Lendacky
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-11-17 10:59 UTC (permalink / raw)
  To: Tom Lendacky; +Cc: netdev, kernel-janitors

"ret" needs to be signed for the error handling to work.

Fixes: abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 4ba4332..a2559c2 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -2346,7 +2346,8 @@ static bool xgbe_phy_valid_speed(struct xgbe_prv_data *pdata, int speed)
 static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart)
 {
 	struct xgbe_phy_data *phy_data = pdata->phy_data;
-	unsigned int ret, reg;
+	unsigned int reg;
+	int ret;
 
 	*an_restart = 0;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-17 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 10:59 [patch] amd-xgbe: Signedness bug in xgbe_phy_link_status() Dan Carpenter
2016-11-17 14:40 ` Tom Lendacky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).