⬢ DragonFlyBSD Kernel Audit
DF-5137 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/drm/radeon/kv_smc.c
+++ b/sys/dev/drm/radeon/kv_smc.c
@@ -41,11 +41,10 @@
 	}
 	tmp = RREG32(SMC_RESP_0) & SMC_RESP_MASK;
 
-	if (tmp != 1) {
-		if (tmp == 0xFF)
-			return -EINVAL;
-		else if (tmp == 0xFE)
-			return -EINVAL;
+	if (tmp != PPSMC_Result_OK) {
+		dev_err(rdev->dev, "SMC failed to handle message 0x%x (response 0x%x)\n",
+			id & SMC_MSG_MASK, tmp);
+		return -EINVAL;
 	}
 
 	return 0;