aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorShaohui Xie <Shaohui.Xie@freescale.com>2015-11-03 12:27:33 +0800
committerDavid S. Miller <davem@davemloft.net>2015-11-02 23:45:20 -0500
commit5f6c99e0ab805d8ec9eda105822912d49aa1d409 (patch)
tree1a584383b2a07a88e8ba3081e30aed14b2e408c5 /net/ipv4/xfrm4_policy.c
parentsfc: push partner queue for skb->xmit_more (diff)
downloadlinux-dev-5f6c99e0ab805d8ec9eda105822912d49aa1d409.tar.xz
linux-dev-5f6c99e0ab805d8ec9eda105822912d49aa1d409.zip
net: phy: fix a bug in get_phy_c45_ids
When probing devices-in-package for a c45 phy, device zero is the last device to probe, however, if driver reads 0 from device zero, c45_ids->devices_in_package is set to '0', the loop condition of probing will be matched again, see codes below: for (i = 1;i < num_ids && c45_ids->devices_in_package == 0;i++) driver will run in a dead loop. This patch restructures the bug and confusing loop, it provides a helper function get_phy_c45_devs_in_pkg which to read devices-in-package registers of a MMD, and rewrites the loop with using the helper function. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
0 files changed, 0 insertions, 0 deletions