⬢ DragonFlyBSD Kernel Audit
DF-4695 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/disk/sili/sili_pm.c
+++ b/sys/dev/disk/sili/sili_pm.c
@@ -492,10 +492,11 @@ sili_pm_softreset(struct sili_port *ap, int target)
 	} else {
 		if (sili_port_signature(ap, at, sig) != at->at_type) {
 			kprintf("%s: device signature unexpectedly "
 				"changed\n", ATANAME(ap, at));
 			error = EBUSY; /* XXX */
 		}
 	}
-	error = 0;
+	if (error != EBUSY)
+		error = 0;
 err:
--- a/sys/dev/disk/ahci/ahci_pm.c
+++ b/sys/dev/disk/ahci/ahci_pm.c
@@ -850,7 +850,8 @@ ahci_pm_softreset(struct ahci_port *ap, int target)
 			error = EBUSY; /* XXX */
 		}
 	}
-	error = 0;
+	if (error != EBUSY)
+		error = 0;
 
 	/*