diff options
Diffstat (limited to 'net/rds/rdma.c')
-rw-r--r-- | net/rds/rdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c index eaeeb91e1119..e390dc70b9d9 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c | |||
@@ -155,7 +155,7 @@ static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages, | |||
155 | nr_pages, write, 0, pages, NULL); | 155 | nr_pages, write, 0, pages, NULL); |
156 | up_read(¤t->mm->mmap_sem); | 156 | up_read(¤t->mm->mmap_sem); |
157 | 157 | ||
158 | if (0 <= ret && (unsigned) ret < nr_pages) { | 158 | if (ret >= 0 && ret < nr_pages) { |
159 | while (ret--) | 159 | while (ret--) |
160 | put_page(pages[ret]); | 160 | put_page(pages[ret]); |
161 | ret = -EFAULT; | 161 | ret = -EFAULT; |