⬢ DragonFlyBSD Kernel Audit
DF-3859 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/sys/dev/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -2675,7 +2675,7 @@
 			input_clk = input[i + 1];
 			input_vol = input[i + 2];
 
-			if (input_index > 2) {
+			if (input_index < 0 || input_index > 2) {
 				pr_info("Setting for point %d is not supported\n",
 						input_index + 1);
 				pr_info("Three supported points index by 0, 1, 2\n");