⬢ DragonFlyBSD Kernel Audit
DF-4739 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/powermng/alpm/alpm.c
+++ b/sys/dev/powermng/alpm/alpm.c
@@ -313,7 +313,7 @@ alpm_wait(struct alpm_softc *sc)
 
 	ALPM_DEBUG(kprintf("alpm: STS=0x%x\n", sts));
 
 	error = SMB_ENOERR;
 
-	if (!count)
+	if (count < 0)
 		error |= SMB_ETIMEOUT;
 
 	if (sts & TERMINATE)