]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: cpsw: fix buggy loop condition
authorHeiko Schocher <hs@denx.de>
Thu, 13 Feb 2014 13:47:27 +0000 (14:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 23:50:04 +0000 (18:50 -0500)
commita87ca6ae8bb3616fe9f11b768bfbd794dc6d38ab
tree6b3ca4159181b098605a199119990e8f8fdcd7f6
parent52a0abfdb3135d8415738128e0905dbd78cf7c65
drivers: net: cpsw: fix buggy loop condition

Commit ff82ac0c68d5dc84c211956c2be82f34bf818431 ("drivers: net: cpsw:
enable promiscuous mode support")

Enable promiscuous mode support for CPSW.

Introduced a crash on an am335x based board (similiar to am335x-evm).
Reason is buggy end condition in for loop in cpsw_set_promiscious()

for (i = 0; i <= priv->data.slaves; i++)

should be

for (i = 0; i < priv->data.slaves; i++)

Fix this ...

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Daniel Mack <zonque@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Markus Pargmann <mpa@pengutronix.de>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c