OSDN Git Service

crypto: qat - free irqs only if allocated
authorMaksim Lukoshkov <maksim.lukoshkov@intel.com>
Wed, 1 Sep 2021 17:36:07 +0000 (18:36 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Sep 2021 03:05:12 +0000 (11:05 +0800)
commit9832fdc917de0f28772558688d7fa6c097c9c6cc
tree2cb9e8cb4a353dca3486f79667610c09a23d6611
parent0e64dcd7c94b94f90b820bfbe57bbcea8bf21545
crypto: qat - free irqs only if allocated

Change the irq allocation logic so that it is possible to free only the
allocated irqs in case of error.
A new flag is introduced for every PF/VF interrupt. This flag is set to
"true" only when the interrupt is requested.
During clean up, devm_free_irq() is only called if this flag is set.

Signed-off-by: Maksim Lukoshkov <maksim.lukoshkov@intel.com>
Co-developed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_accel_devices.h
drivers/crypto/qat/qat_common/adf_isr.c
drivers/crypto/qat/qat_common/adf_vf_isr.c