net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be out of bound
authorzhangyue <zhangyue1@kylinos.cn>
Thu, 18 Nov 2021 05:46:32 +0000 (13:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Nov 2021 11:59:26 +0000 (11:59 +0000)
commit61217be886b5f7402843677e4be7e7e83de9cb41
tree47681275b5b3399144d45b3cf6a006cd1ad91fc8
parent4e5d2124f74f6f481de4f85bc825fe52a5af4280
net: tulip: de4x5: fix the problem that the array 'lp->phy[8]' may be out of bound

In line 5001, if all id in the array 'lp->phy[8]' is not 0, when the
'for' end, the 'k' is 8.

At this time, the array 'lp->phy[8]' may be out of bound.

Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dec/tulip/de4x5.c