]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ISDN Eicon driver: fix empty queue check
authorArmin Schindler <armin@melware.de>
Sat, 8 May 2004 03:29:42 +0000 (20:29 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 8 May 2004 03:29:42 +0000 (20:29 -0700)
   Check for last adapter link is done by next member,
   because entries are not removed yet.

drivers/isdn/hardware/eicon/diva.c

index d964ca969c74825a9ea3f5438cb11f8b6098b099..47cf327eb3e4a3aa01b69d8fed63be524c460097 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: diva.c,v 1.21 2004/03/21 17:30:25 armin Exp $ */
+/* $Id: diva.c,v 1.21.4.1 2004/05/08 14:33:43 armin Exp $ */
 
 #define CARDTYPE_H_WANT_DATA            1
 #define CARDTYPE_H_WANT_IDI_DATA        0
@@ -156,7 +156,7 @@ static diva_os_xdi_adapter_t *diva_q_get_next(struct list_head * what)
 {
        diva_os_xdi_adapter_t *a = NULL;
 
-       if (what && !list_empty(what))
+       if (what && (what->next != &adapter_queue))
                a = list_entry(what->next, diva_os_xdi_adapter_t, link);
 
        return(a);