summaryrefslogtreecommitdiffstats
path: root/net/rds/rdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/rdma.c')
-rw-r--r--net/rds/rdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 0df02c8..d0ba2ca 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -554,8 +554,10 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
}
nr_pages = rds_rdma_pages(args);
- if (nr_pages < 0)
+ if (nr_pages < 0) {
+ ret = -EINVAL;
goto out;
+ }
pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL);
if (!pages) {
OpenPOWER on IntegriCloud