]> git.baikalelectronics.ru Git - kernel.git/commit
stmmac: fix pointer check after utilization in stmmac_interrupt
authorMaxim Petrov <mmrmaximuzz@gmail.com>
Mon, 4 May 2020 06:26:43 +0000 (09:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2020 17:33:53 +0000 (10:33 -0700)
commit5390682e2f14c6759f0e70e2925c02109e7a6fd7
tree900040f116fccd53a8b938e11f845030d333ac87
parent7dda00e010ff96eaf0f58d002068ac73a3e1c284
stmmac: fix pointer check after utilization in stmmac_interrupt

The paranoidal pointer check in IRQ handler looks very strange - it
really protects us only against bogus drivers which request IRQ line
with null pointer dev_id. However, the code fragment is incorrect
because the dev pointer is used before the actual check which leads
to undefined behavior. Remove the check to avoid confusing people
with incorrect code.

Signed-off-by: Maxim Petrov <mmrmaximuzz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c