net/mvpp2: check pointer before using it
Avoid NULL dereference by checking pointer before using it. Note that the fixes tag is before the driver was renamed to mvpp2, so the patch will not apply that far back. Fixes: 3588aaa68eab ("net/mrvl: fix HIF objects allocation") Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
This commit is contained in:
parent
acab7d58c8
commit
42ab8427d4
@ -1614,9 +1614,12 @@ mrvl_rx_queue_release(void *rxq)
|
||||
if (core_id == LCORE_ID_ANY)
|
||||
core_id = 0;
|
||||
|
||||
if (!q)
|
||||
return;
|
||||
|
||||
hif = mrvl_get_hif(q->priv, core_id);
|
||||
|
||||
if (!q || !hif)
|
||||
if (!hif)
|
||||
return;
|
||||
|
||||
tc = q->priv->rxq_map[q->queue_id].tc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user