Explorar el Código

via-velocity: fix hot spin

while(--j >= 0) keeps spinning when j is unsigned:

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
roel kluin hace 16 años
padre
commit
0d1cfd20cc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/net/via-velocity.c

+ 1 - 1
drivers/net/via-velocity.c

@@ -1302,7 +1302,7 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
 static int velocity_init_td_ring(struct velocity_info *vptr)
 static int velocity_init_td_ring(struct velocity_info *vptr)
 {
 {
 	dma_addr_t curr;
 	dma_addr_t curr;
-	unsigned int j;
+	int j;
 
 
 	/* Init the TD ring entries */
 	/* Init the TD ring entries */
 	for (j = 0; j < vptr->tx.numq; j++) {
 	for (j = 0; j < vptr->tx.numq; j++) {