OSDN Git Service

cxgb4: fix the error path of cxgb4_uld_register()
authorGanesh Goudar <ganeshgr@chelsio.com>
Thu, 18 Oct 2018 14:04:19 +0000 (19:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2018 23:26:36 +0000 (16:26 -0700)
commit40b06553c906a56ae31677b3ecbd49546947698d
treea9acaee91fa26232905f9e857ebd42ac2158e70e
parent35b842f25b603028fab7ff11b54a4410ee345c8a
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>
drivers/crypto/chelsio/chcr_core.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h