--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/ibm/ehea/ehea_qmr.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/ibm/ehea/ehea_qmr.c 2021-02-04 17:41:59.000000000 +0000 @@ -103,12 +103,14 @@ static void hw_queue_dtor(struct hw_queue *queue) { - int pages_per_kpage = PAGE_SIZE / queue->pagesize; + int pages_per_kpage; int i, nr_pages; if (!queue || !queue->queue_pages) return; + pages_per_kpage = PAGE_SIZE / queue->pagesize; + nr_pages = queue->queue_length / queue->pagesize; for (i = 0; i < nr_pages; i += pages_per_kpage)