drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()

This change “drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()” (commit 0b80129) in Linux kernel is authored by Dan Carpenter <dan.carpenter [at] oracle.com> on Wed Dec 7 14:14:24 2016 +0300.

Description of "drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()"

The change “drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()” introduces changes as follows.

drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()

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>

Linux kernel releases containing commit 0b80129

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool()"

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 1 +
 1 file changed, 1 insertion(+)
 
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 6c7eea8b36af..884a334e82d0 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -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++) {

The commit for this change in Linux stable tree is 0b80129 (patch).

Last modified: 2020/02/09