From: Desnes Augusto Nunes do Rosario <hidden> Date: 2017-11-16 18:33:44
This patch fixes the dma_mapping_error call to use the correct dma_addr
which is inside the ibmvnic_vpd struct. Moreover, it fixes a uninitialized
warning for the local dma_addr.
Signed-off-by: Desnes A. Nunes do Rosario <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Desnes Augusto Nunes do Rosário <hidden> Date: 2017-11-16 19:53:29
First of all, I apologize for sending this patch to net-next!
Since this is a fix, it should had been sent to the regular net tree,
which I'll do now with the proper fixes tag. My mistake!
Thanks for understanding and please discard this one.
On 11/16/2017 04:33 PM, Desnes Augusto Nunes do Rosario wrote:
quoted hunk
This patch fixes the dma_mapping_error call to use the correct dma_addr
which is inside the ibmvnic_vpd struct. Moreover, it fixes a uninitialized
warning for the local dma_addr.
Signed-off-by: Desnes A. Nunes do Rosario <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -849,7 +849,6 @@ static int ibmvnic_get_vpd(struct ibmvnic_adapter *adapter){structdevice*dev=&adapter->vdev->dev;unionibmvnic_crqcrq;-dma_addr_tdma_addr;intlen=0;if(adapter->vpd->buff)
@@ -879,7 +878,7 @@ static int ibmvnic_get_vpd(struct ibmvnic_adapter *adapter)adapter->vpd->dma_addr=dma_map_single(dev,adapter->vpd->buff,adapter->vpd->len,DMA_FROM_DEVICE);-if(dma_mapping_error(dev,dma_addr)){+if(dma_mapping_error(dev,adapter->vpd->dma_addr)){dev_err(dev,"Could not map VPD buffer\n");kfree(adapter->vpd->buff);return-ENOMEM;
--
Desnes Augusto Nunes do Rosário
------------------------------------------
Linux Developer - IBM / Brazil
M.Sc. in Electrical and Computer Engineering - UFRN
(11) 9595-30-900
desnesn@br.ibm.com