diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2022-08-10 13:40:52 +0300 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2022-08-11 13:16:05 +0200 |
commit | 7be1dfb794aa44ef2f8a20eae91a3d27f89847e4 (patch) | |
tree | 7807f33fed8c2a6f6ab54a6efb10bcdd2df8b803 /drivers/net/ethernet/myricom | |
parent | 627b759bb69ec5b54ada4ee17f3fac7f5d329887 (diff) |
dpaa2-eth: move the percpu_stats setup to avoid a uninitialized access
The XDP and AF_XDP current support on DPAA2 does not include S/G frames.
This is why, in case the a S/G frame is received in the dpaa2-eth AF_XDP
rx path, the frame needs to be discarded and the number of error frames
needs to be incremented.
In case this happens, the percpu_stats variable is not initialized. Fix
this by moving the percpu_stats setup before the first 'goto' statement.
Fixes: e77a60fab247 ("net: dpaa2: AF_XDP RX zero copy support")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Diffstat (limited to 'drivers/net/ethernet/myricom')
0 files changed, 0 insertions, 0 deletions