lkml.org 
[lkml]   [2015]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2/4] crypto-ixp4xx: Two function calls less in init_ixp_crypto() after error detection
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Sun, 15 Nov 2015 18:28:39 +0100

    The dma_pool_destroy() function was called twice with a null pointer
    if a "npe_error" was reported.

    This implementation detail could be improved by the introduction
    of another jump label.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/crypto/ixp4xx_crypto.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
    index e52496a..efe0eca 100644
    --- a/drivers/crypto/ixp4xx_crypto.c
    +++ b/drivers/crypto/ixp4xx_crypto.c
    @@ -509,9 +509,11 @@ static int init_ixp_crypto(struct device *dev)
    npe_error:
    printk(KERN_ERR "%s not responding\n", npe_name(npe_c));
    ret = -EIO;
    + goto release_npe;
    err:
    dma_pool_destroy(ctx_pool);
    dma_pool_destroy(buffer_pool);
    +release_npe:
    npe_release(npe_c);
    return ret;
    }
    --
    2.6.2


    \
     
     \ /
      Last update: 2015-11-15 20:01    [W:4.025 / U:0.272 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site