⬢ DragonFlyBSD Kernel Audit
DF-5539 / fix.diff
← back to finding ↓ download raw
--- iicbb.c.orig	2026-10-07 06:29:56.548244870 +0000
+++ iicbb.c.fixed	2026-10-07 06:30:01.648179096 +0000
@@ -166,12 +166,12 @@
 {
 	int error;
 	int retval = 0;
-	u_char oldaddr;
+	u_char oldaddr = 0;
 
 	retval += bus_print_child_header(bus, dev);
 	/* retrieve the interface I2C address */
 	error = IICBB_RESET(device_get_parent(bus), IIC_FASTEST, 0, &oldaddr);
-	if (error == IIC_ENOADDR) {
+	if (error != IIC_NOERR) {
 		retval += kprintf(" on %s master-only\n",
 				 device_get_nameunit(bus));
 	} else {