From: hpeyerl Date: Thu, 02 Aug 2012 10:31:42 -0600 Subject: [U-Boot] [PATCH] PPC temac phy probe unsigned int underflow fix. Message-ID: <574be49434caea48b4f5ed19536735b3@mail.beer.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: hpeyerl at beer.org (Herb Peyerl) Apologies for the non-git formatted drive-by patch. If, during phy detection, your phy does not respond, then ll_temac_phy_addr() will underflow due to the declaration of local variable 'phy' as an unsigned int. --- drivers/net/xilinx_ll_temac_mdio.c 11 Jul 2012 00:52:14 -0000 1.1.1.1 +++ drivers/net/xilinx_ll_temac_mdio.c 2 Aug 2012 16:23:48 -0000 @@ -137,7 +137,7 @@ { struct temac_reg *regs = (struct temac_reg *)bus->priv; unsigned short val; - unsigned int phy; + int phy; for (phy = PHY_MAX_ADDR; phy >= 0; phy--) { val = ll_temac_local_mdio_read(regs, phy, 0, PHY_DETECT_REG);