projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5cc983
)
RDMA/umem: Don't check for a negative return value of dma_map_sg_attrs()
author
Leon Romanovsky
<leonro@mellanox.com>
Sun, 24 Jun 2018 08:23:48 +0000
(11:23 +0300)
committer
Jason Gunthorpe
<jgg@mellanox.com>
Tue, 26 Jun 2018 20:37:26 +0000
(14:37 -0600)
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>
drivers/infiniband/core/umem.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/core/umem.c
b/drivers/infiniband/core/umem.c
index
54ab633
..
498f59b
100644
(file)
--- a/
drivers/infiniband/core/umem.c
+++ b/
drivers/infiniband/core/umem.c
@@
-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;
}