Re: [PATCH v2] stmmac: fix pointer check after utilization in stmmac_interrupt

From: David Miller
Date: Mon May 04 2020 - 13:34:12 EST


From: Maxim Petrov <mmrmaximuzz@xxxxxxxxx>
Date: Mon, 4 May 2020 09:26:43 +0300

> 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@xxxxxxxxx>

Applied, thanks.