summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2018-05-16 22:49:03 +0200
committerDavid S. Miller <davem@davemloft.net>2018-05-17 20:57:19 +0200
commit4cf2ddf3e329d4ec1e3edda3465a202b5665be0e (patch)
tree60d9a5221278f4f73bf13cbb5b54de3dfa676f6f /drivers/net/ethernet/ibm
parentnet/ipv4: Initialize proto and ports in flow struct (diff)
downloadlinux-4cf2ddf3e329d4ec1e3edda3465a202b5665be0e.tar.xz
linux-4cf2ddf3e329d4ec1e3edda3465a202b5665be0e.zip
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/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c1
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;