Skip to content
Commit f96e9641 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by David S. Miller
Browse files

net: ethernet: mtk-star-emac: fix error path in RX handling

The dma_addr field in desc_data must not be overwritten until after the
new skb is mapped. Currently we do replace it with uninitialized value
in error path. This change fixes it by moving the assignment before the
label to which we jump after mapping or allocation errors.

Fixes: 8c7bd5a4

 ("net: ethernet: mtk-star-emac: new driver")
Reported-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com> # build
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7cf4eda4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment