aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-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)
98 BUG_ON(!head); 98 BUG_ON(!head);
99 99
100 page = *head; 100 page = *head;
101
102 if (!page)
103 return NULL;
104
101 while (page) { 105 while (page) {
102 tmp = page_chain_next(page); 106 tmp = page_chain_next(page);
103 if (--n == 0) 107 if (--n == 0)