Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271352
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/3] crypto-ixp4xx: Delete unnecessary checks before the function call "dma_pool_destroy" |
| Date | 2015-11-17 16:50 +0100 |
| Message-ID | <qvQG6-6Vs-35@gated-at.bofh.it> (permalink) |
| References | (14 earlier) <mSsDN-4wa-63@gated-at.bofh.it> <mSsDN-4wa-65@gated-at.bofh.it> <mSsDN-4wa-33@gated-at.bofh.it> <qvaxb-526-7@gated-at.bofh.it> <qvQwr-6RR-45@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Sun, 15 Nov 2015 16:51:21 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/crypto/ixp4xx_crypto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 8f27903..e52496a 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -510,10 +510,8 @@ npe_error: printk(KERN_ERR "%s not responding\n", npe_name(npe_c)); ret = -EIO; err: - if (ctx_pool) - dma_pool_destroy(ctx_pool); - if (buffer_pool) - dma_pool_destroy(buffer_pool); + dma_pool_destroy(ctx_pool); + dma_pool_destroy(buffer_pool); npe_release(npe_c); return ret; } -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks SF Markus Elfring <elfring@users.sourceforge.net> - 2015-11-17 16:40 +0100
[PATCH v2 2/3] crypto-ixp4xx: Reduce assignment for a variable in init_ixp_crypto() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-11-17 16:50 +0100
[PATCH v2 3/3] crypto-ixp4xx: Less function calls in init_ixp_crypto() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2015-11-17 16:50 +0100
[PATCH v2 1/3] crypto-ixp4xx: Delete unnecessary checks before the function call "dma_pool_destroy" SF Markus Elfring <elfring@users.sourceforge.net> - 2015-11-17 16:50 +0100
Re: [PATCH v2 0/3] crypto-ixp4xx: Deletion of a few unnecessary checks Herbert Xu <herbert@gondor.apana.org.au> - 2015-11-18 01:10 +0100
Re: crypto-ixp4xx: Deletion of a few unnecessary checks SF Markus Elfring <elfring@users.sourceforge.net> - 2015-11-18 08:30 +0100
csiph-web