Skip to content
Commit ec1b9088 authored by Mikhail Kobuk's avatar Mikhail Kobuk Committed by David S. Miller
Browse files

ethernet: tg3: remove unreachable code



'tp->irq_max' value is either 1 [L16336] or 5 [L16354], as indicated in
tg3_get_invariants(). Therefore, 'i' can't exceed 4 in tg3_init_one()
that makes (i <= 4) always true. Moreover, 'intmbx' value set at the
last iteration is not used later in it's scope.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 78f90dcf ("tg3: Move napi_add calls below tg3_get_invariants")
Signed-off-by: default avatarMikhail Kobuk <m.kobuk@ispras.ru>
Reviewed-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 977ad86c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment