crypto/qat: improve security instance setup
authorDavid Coyle <david.coyle@intel.com>
Mon, 20 Jul 2020 12:16:20 +0000 (13:16 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Tue, 28 Jul 2020 20:09:21 +0000 (22:09 +0200)
commit8688fcf030f746b07ecc70b382ca60b0f731b016
treedc53a9d042ec281d98d2d5708e7c3876fda263db
parentb8d81e9cbf5e411133800da8fddc80a636e3555d
crypto/qat: improve security instance setup

This patch makes some improvements to the security instance setup for
the QAT SYM PMD, as follows:
- fix potential memory leak where the security instance was not freed if
  an error occurred later in the device creation
- tidy-up security instance initialization code by moving it all,
  including enabling the RTE_CRYPTODEV_FF_SECURITY feature, into one
  '#ifdef RTE_LIBRTE_SECURITY' block

Fixes: 6f0ef237404b ("crypto/qat: support DOCSIS protocol")

Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
drivers/crypto/qat/qat_sym_pmd.c