From: Shreyansh Jain Date: Mon, 2 Apr 2018 15:33:19 +0000 (+0530) Subject: crypto/dpaa_sec: fix null check in uninit X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=debef417a0e3609485473e135c5f2fbc541cfc4b;p=dpdk.git crypto/dpaa_sec: fix null check in uninit Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform") Cc: akhil.goyal@nxp.com Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain --- diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 21abd82bc3..a260a11a19 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2234,11 +2234,12 @@ struct rte_security_ops dpaa_sec_security_ops = { static int dpaa_sec_uninit(struct rte_cryptodev *dev) { - struct dpaa_sec_dev_private *internals = dev->data->dev_private; + struct dpaa_sec_dev_private *internals; if (dev == NULL) return -ENODEV; + internals = dev->data->dev_private; rte_free(dev->security_ctx); rte_mempool_free(internals->ctx_pool);