mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
35b842f25b
commit
40b06553c9
3 changed files with 13 additions and 39 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue