X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fasync.c;h=27235f5de198997180d4a293adc932d48c6101c7;hb=4a390e07fc53ce9dd615d7b788e9ecc73f87ad94;hp=50540301ed0f2d5308ab15a012715bd0b53f0a04;hpb=b7c11ec9f1c9f4272f032215ddb0b65d64b22ecc;p=pandora-kernel.git diff --git a/kernel/async.c b/kernel/async.c index 50540301ed0f..27235f5de198 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -92,23 +92,18 @@ extern int initcall_debug; static async_cookie_t __lowest_in_progress(struct list_head *running) { struct async_entry *entry; - async_cookie_t ret = next_cookie; /* begin with "infinity" value */ if (!list_empty(running)) { entry = list_first_entry(running, struct async_entry, list); - ret = entry->cookie; + return entry->cookie; } - if (!list_empty(&async_pending)) { - list_for_each_entry(entry, &async_pending, list) - if (entry->running == running) { - ret = entry->cookie; - break; - } - } + list_for_each_entry(entry, &async_pending, list) + if (entry->running == running) + return entry->cookie; - return ret; + return next_cookie; /* "infinity" value */ } static async_cookie_t lowest_in_progress(struct list_head *running)