cassini: fix off by one
There are only 6 link_modes. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d4612cb86e
commit
bf829370a8
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user