diff options
author | Ganesh Goudar <ganeshgr@chelsio.com> | 2018-10-18 19:34:19 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-18 16:26:36 -0700 |
commit | 40b06553c906a56ae31677b3ecbd49546947698d (patch) | |
tree | a9acaee91fa26232905f9e857ebd42ac2158e70e /drivers/crypto/chelsio | |
parent | 35b842f25b603028fab7ff11b54a4410ee345c8a (diff) |
cxgb4: fix the error path of cxgb4_uld_register()
On multi adapter setup if the uld registration fails even on
one adapter, the allocated resources for the uld on all the
adapters are freed, rendering the functioning adapters unusable.
This commit fixes the issue by freeing the allocated resources
only for the failed adapter.
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/crypto/chelsio')
-rw-r--r-- | drivers/crypto/chelsio/chcr_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c index 04f277cade7c..62249d4ed373 100644 --- a/drivers/crypto/chelsio/chcr_core.c +++ b/drivers/crypto/chelsio/chcr_core.c @@ -237,9 +237,7 @@ static int chcr_uld_state_change(void *handle, enum cxgb4_state state) static int __init chcr_crypto_init(void) { - if (cxgb4_register_uld(CXGB4_ULD_CRYPTO, &chcr_uld_info)) - pr_err("ULD register fail: No chcr crypto support in cxgb4\n"); - + cxgb4_register_uld(CXGB4_ULD_CRYPTO, &chcr_uld_info); return 0; } |