]> git.baikalelectronics.ru Git - kernel.git/commit
phy: Fix warning in get_phy_device().
authorDavid S. Miller <davem@davemloft.net>
Thu, 28 Jun 2012 04:28:14 +0000 (21:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jun 2012 04:28:14 +0000 (21:28 -0700)
commit8d4c38b0505753c8873db31106c0723c22ca3d09
tree1ba2d2bafc0eee95b4c747666fb8868c01ffeb19
parent7223bf10351a1fdf71854f5a4fe4c3ebf5ea7a5c
phy: Fix warning in get_phy_device().

drivers/net/phy/phy_device.c: In function ‘get_phy_device’:
drivers/net/phy/phy_device.c:340:14: warning: ‘phy_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]

GCC can't see that when we return zero we always initialize
phy_id and that's the only path where we use it.

Initialize phy_id to zero to shut it up.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c