提交 bf829370 编写于 作者: D Dan Carpenter 提交者: David S. Miller

cassini: fix off by one

There are only 6 link_modes.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d4612cb8
...@@ -5072,7 +5072,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, ...@@ -5072,7 +5072,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
INIT_WORK(&cp->reset_task, cas_reset_task); INIT_WORK(&cp->reset_task, cas_reset_task);
/* Default link parameters */ /* Default link parameters */
if (link_mode >= 0 && link_mode <= 6) if (link_mode >= 0 && link_mode < 6)
cp->link_cntl = link_modes[link_mode]; cp->link_cntl = link_modes[link_mode];
else else
cp->link_cntl = BMCR_ANENABLE; cp->link_cntl = BMCR_ANENABLE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册