⬢ DragonFlyBSD Kernel Audit
DF-4229 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/smbus/cyapa/cyapa.c
+++ b/sys/dev/smbus/cyapa/cyapa.c
@@ -788,7 +788,7 @@
 	cdev_t dev = ap->a_head.a_dev;
 	struct cyapa_softc *sc = CYAPA_SOFTC(minor(dev));
 	struct uio *uio = ap->a_uio;
-	int error;
+	int error = 0;		/* DF-4229: uninit on zero-resid writes */
 	int cmd_completed;
 	size_t n;
 	uint8_t c0;