Fix the code to abort when trying to detach a slot that's not

on the list (the check was a no-op). Found by jsg@, thanks.
This commit is contained in:
Alexandre Ratchov 2017-02-15 11:58:54 +01:00
parent ca24b960e4
commit f9f2d8353e
1 changed files with 1 additions and 1 deletions

View File

@ -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();