drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 7 Dec 2016 11:14:24 +0000 (14:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Dec 2016 16:27:46 +0000 (11:27 -0500)
We never set "slots" in this function.

Fixes: a9380b0f7be8 ("drivers: net: xgene: Add support for Jumbo frame")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c

index 6c7eea8b36afb41d1c551680e054a862ed3885bd..884a334e82d0729e80fe7f8e52f704e85442fe22 100644 (file)
@@ -635,6 +635,7 @@ static void xgene_enet_free_pagepool(struct xgene_enet_desc_ring *buf_pool,
                return;
 
        dev = ndev_to_dev(buf_pool->ndev);
+       slots = buf_pool->slots - 1;
        head = buf_pool->head;
 
        for (i = 0; i < 4; i++) {