summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/rds/info.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rds/info.c b/net/rds/info.c
index e1d63563e81c..b6b46a8214a0 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -234,7 +234,8 @@ call_func:
ret = -EFAULT;
out:
- unpin_user_pages(pages, nr_pages);
+ if (pages)
+ unpin_user_pages(pages, nr_pages);
kfree(pages);
return ret;