summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/cavium/cpt/cptvf_main.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-04 10:42:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-04 10:42:53 -0800
commit33a8b3e99dc68abfe25e140144ad268e70660be3 (patch)
tree3b30c600b2ebc3bcb1f18e8c037ec9e250021f6e /drivers/crypto/cavium/cpt/cptvf_main.c
parent0710f3ff91ecc4a715db6e4d0690472b13c4dac6 (diff)
parent5839f555fa576be57371686265206398d9ea1480 (diff)
downloadop-kernel-dev-33a8b3e99dc68abfe25e140144ad268e70660be3.zip
op-kernel-dev-33a8b3e99dc68abfe25e140144ad268e70660be3.tar.gz
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - vmalloc stack regression in CCM - Build problem in CRC32 on ARM - Memory leak in cavium - Missing Kconfig dependencies in atmel and mediatek - XTS Regression on some platforms (s390 and ppc) - Memory overrun in CCM test vector * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: vmx - Use skcipher for xts fallback crypto: vmx - Use skcipher for cbc fallback crypto: testmgr - Pad aes_ccm_enc_tv_template vector crypto: arm/crc32 - add build time test for CRC instruction support crypto: arm/crc32 - fix build error with outdated binutils crypto: ccm - move cbcmac input off the stack crypto: xts - Propagate NEED_FALLBACK bit crypto: api - Add crypto_requires_off helper crypto: atmel - CRYPTO_DEV_MEDIATEK should depend on HAS_DMA crypto: atmel - CRYPTO_DEV_ATMEL_TDES and CRYPTO_DEV_ATMEL_SHA should depend on HAS_DMA crypto: cavium - fix leak on curr if curr->head fails to be allocated crypto: cavium - Fix couple of static checker errors
Diffstat (limited to 'drivers/crypto/cavium/cpt/cptvf_main.c')
-rw-r--r--drivers/crypto/cavium/cpt/cptvf_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c
index aac2966..6ffc740 100644
--- a/drivers/crypto/cavium/cpt/cptvf_main.c
+++ b/drivers/crypto/cavium/cpt/cptvf_main.c
@@ -242,6 +242,7 @@ static int alloc_command_queues(struct cpt_vf *cptvf,
if (!curr->head) {
dev_err(&pdev->dev, "Command Q (%d) chunk (%d) allocation failed\n",
i, queue->nchunks);
+ kfree(curr);
goto cmd_qfail;
}
@@ -815,8 +816,10 @@ static void cptvf_remove(struct pci_dev *pdev)
{
struct cpt_vf *cptvf = pci_get_drvdata(pdev);
- if (!cptvf)
+ if (!cptvf) {
dev_err(&pdev->dev, "Invalid CPT-VF device\n");
+ return;
+ }
/* Convey DOWN to PF */
if (cptvf_send_vf_down(cptvf)) {
OpenPOWER on IntegriCloud