iw_cxgb4: Fix an error handling path in 'c4iw_get_dma_mr()'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Tue, 8 May 2018 05:44:27 +0000 (07:44 +0200)
committerDoug Ledford <dledford@redhat.com>
Wed, 9 May 2018 14:45:19 +0000 (10:45 -0400)
commit3d69191086fc87f202c79eb8873b9c82c2bb065a
treefdb9533bc7357e9633b544eedbe1c82a889fc30e
parent43731753c4b7d832775cf6b2301dd0447a5a1851
iw_cxgb4: Fix an error handling path in 'c4iw_get_dma_mr()'

The error handling path of 'c4iw_get_dma_mr()' does not free resources
in the correct order.
If an error occures, it can leak 'mhp->wr_waitp'.

Fixes: a3f12da0e99a ("iw_cxgb4: allocate wait object for each memory object")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/mem.c