Coverity flags that 'portal' variable is used before
it's checked for NULL. This patch fixes this issue.
Coverity issue: 323516
Fixes:
4ab57b042e7c ("event/dpaa2: affine portal at runtime during I/O")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
EVENTDEV_INIT_FUNC_TRACE();
+ if (portal == NULL)
+ return;
+
/* TODO: Cleanup is required when ports are in linked state. */
if (portal->is_port_linked)
DPAA2_EVENTDEV_WARN("Event port must be unlinked before release");
- if (portal)
- rte_free(portal);
-
- portal = NULL;
+ rte_free(portal);
}
static int