diff --git a/[refs] b/[refs] index 5b9ad789192b..164b51ec29fc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e484610296b25f0a04b516bc144a00731d1d845 +refs/heads/master: 232f1b51062553b7cf49f99719fbd1b8a8d80f29 diff --git a/trunk/lib/scatterlist.c b/trunk/lib/scatterlist.c index 1bf60efb5e02..8cd2ced68f36 100644 --- a/trunk/lib/scatterlist.c +++ b/trunk/lib/scatterlist.c @@ -49,12 +49,9 @@ EXPORT_SYMBOL(sg_next); **/ int sg_nents(struct scatterlist *sg) { - int nents = 0; - while (sg) { + int nents; + for (nents = 0; sg; sg = sg_next(sg)) nents++; - sg = sg_next(sg); - } - return nents; } EXPORT_SYMBOL(sg_nents);