diff options
author | Thomas Falcon <tlfalcon@linux.vnet.ibm.com> | 2018-05-16 15:49:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-17 14:57:19 -0400 |
commit | 4cf2ddf3e329d4ec1e3edda3465a202b5665be0e (patch) | |
tree | 60d9a5221278f4f73bf13cbb5b54de3dfa676f6f /drivers/net | |
parent | 5a847a6e1477be5bd3f94cc1b7708d7d4a7cd94c (diff) |
ibmvnic: Free coherent DMA memory if FW map failed
If the firmware map fails for whatever reason, remember to free
up the memory after.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 6e8d6a6f6aaf..9e08917cda1f 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -192,6 +192,7 @@ static int alloc_long_term_buff(struct ibmvnic_adapter *adapter, if (adapter->fw_done_rc) { dev_err(dev, "Couldn't map long term buffer,rc = %d\n", adapter->fw_done_rc); + dma_free_coherent(dev, ltb->size, ltb->buff, ltb->addr); return -1; } return 0; |