--- zzzz-none-000/linux-2.6.39.4/drivers/char/agp/frontend.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/drivers/char/agp/frontend.c 2021-11-10 13:38:14.000000000 +0000 @@ -112,7 +112,7 @@ seg = *(client->segments); num_segments = client->num_segments; - for (i = 0; i < client->num_segments; i++) { + for (i = 0; i < num_segments; i++) { if ((seg[i].pg_start == pg_start) && (seg[i].pg_count == pg_count) && (pgprot_val(seg[i].prot) == pgprot_val(page_prot))) {