summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 461d9872d4d3..bc9ab7fb2cc7 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -98,6 +98,10 @@ static struct page *page_chain_del(struct page **head, int n)
BUG_ON(!head);
page = *head;
+
+ if (!page)
+ return NULL;
+
while (page) {
tmp = page_chain_next(page);
if (--n == 0)