bus/fslmc: fix dpio close
The current state of the DPIO object should be checked
before trying to close/disable the object.
Fixes: 293c0ca94c
("bus/fslmc: support memory backed portals with QBMAN 5.0")
Cc: stable@dpdk.org
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
This commit is contained in:
parent
6ee0c53fda
commit
ba156cdf70
@ -528,8 +528,13 @@ dpaa2_create_dpio_device(int vdev_fd,
|
|||||||
|
|
||||||
err:
|
err:
|
||||||
if (dpio_dev->dpio) {
|
if (dpio_dev->dpio) {
|
||||||
dpio_disable(dpio_dev->dpio, CMD_PRI_LOW, dpio_dev->token);
|
if (dpio_dev->token) {
|
||||||
dpio_close(dpio_dev->dpio, CMD_PRI_LOW, dpio_dev->token);
|
dpio_disable(dpio_dev->dpio, CMD_PRI_LOW,
|
||||||
|
dpio_dev->token);
|
||||||
|
dpio_close(dpio_dev->dpio, CMD_PRI_LOW,
|
||||||
|
dpio_dev->token);
|
||||||
|
}
|
||||||
|
|
||||||
rte_free(dpio_dev->eqresp);
|
rte_free(dpio_dev->eqresp);
|
||||||
rte_free(dpio_dev->dpio);
|
rte_free(dpio_dev->dpio);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user