X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Fasync.c;h=27235f5de198997180d4a293adc932d48c6101c7;hb=7eef4091a653c243a87e5375c54504cc03bec4d8;hp=50540301ed0f2d5308ab15a012715bd0b53f0a04;hpb=54726f14b53cae061c504ac572320a16a5616de5;p=mv-sheeva.git diff --git a/kernel/async.c b/kernel/async.c index 50540301ed0..27235f5de19 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)