DragonFlyBSD Kernel Audit
DF-1816 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/amd/powerplay/hwmgr/ppatomfwctrl.c b/sys/dev/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
--- a/sys/dev/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
+++ b/sys/dev/drm/amd/powerplay/hwmgr/ppatomfwctrl.c
@@ -197,7 +197,7 @@
 					le16_to_cpu(pin_assignment->data_a_reg_index);
 			return true;
 		}
-		offset += offsetof(struct atom_gpio_pin_assignment, gpio_id) + 1;
+		offset += sizeof(struct atom_gpio_pin_assignment);
 	}
 	return false;
 }