From debef417a0e3609485473e135c5f2fbc541cfc4b Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Mon, 2 Apr 2018 21:03:19 +0530 Subject: [PATCH] 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 --- drivers/crypto/dpaa_sec/dpaa_sec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.20.1