diff --git a/sndiod/dev.c b/sndiod/dev.c index 494f074..ef85a83 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -1824,7 +1824,7 @@ slot_detach(struct slot *s) #endif for (ps = &s->dev->slot_list; *ps != s; ps = &(*ps)->next) { #ifdef DEBUG - if (s == NULL) { + if (*ps == NULL) { slot_log(s); log_puts(": can't detach, not on list\n"); panic();