mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
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>
This commit is contained in:
parent
5a847a6e14
commit
4cf2ddf3e3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user