Skip to content

Commit

Permalink
IB/qib: Fix an error code in qib_sdma_verbs_send()
Browse files Browse the repository at this point in the history
We accidentally return success on this error path.

Fixes: f931551 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Dan Carpenter authored and Jason Gunthorpe committed Dec 18, 2018
1 parent be5914c commit 5050ae5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/infiniband/hw/qib/qib_sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ int qib_sdma_verbs_send(struct qib_pportdata *ppd,
dw = (len + 3) >> 2;
addr = dma_map_single(&ppd->dd->pcidev->dev, sge->vaddr,
dw << 2, DMA_TO_DEVICE);
if (dma_mapping_error(&ppd->dd->pcidev->dev, addr))
if (dma_mapping_error(&ppd->dd->pcidev->dev, addr)) {
ret = -ENOMEM;
goto unmap;
}
sdmadesc[0] = 0;
make_sdma_desc(ppd, sdmadesc, (u64) addr, dw, dwoffset);
/* SDmaUseLargeBuf has to be set in every descriptor */
Expand Down

0 comments on commit 5050ae5

Please sign in to comment.