提交 3a2e791c 编写于 作者: L Leon Romanovsky 提交者: Jason Gunthorpe

RDMA/umem: Don't check for a negative return value of dma_map_sg_attrs()

dma_map_sg_attrs() returns 0 on error and can't return a negative number
(ensured by BUG_ON), so don't check.
Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 a5cc9831
......@@ -206,7 +206,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
DMA_BIDIRECTIONAL,
dma_attrs);
if (umem->nmap <= 0) {
if (!umem->nmap) {
ret = -ENOMEM;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册