mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 03:42:52 +00:00
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: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
a5cc9831af
commit
3a2e791c94
@ -206,7 +206,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
|
|||||||
DMA_BIDIRECTIONAL,
|
DMA_BIDIRECTIONAL,
|
||||||
dma_attrs);
|
dma_attrs);
|
||||||
|
|
||||||
if (umem->nmap <= 0) {
|
if (!umem->nmap) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user