Skip to content

Commit

Permalink
cassini: fix off by one
Browse files Browse the repository at this point in the history
There are only 6 link_modes.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Mar 3, 2010
1 parent d4612cb commit bf82937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -5072,7 +5072,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
INIT_WORK(&cp->reset_task, cas_reset_task);

/* Default link parameters */
if (link_mode >= 0 && link_mode <= 6)
if (link_mode >= 0 && link_mode < 6)
cp->link_cntl = link_modes[link_mode];
else
cp->link_cntl = BMCR_ANENABLE;
Expand Down

0 comments on commit bf82937

Please sign in to comment.