[PATCH] dmi: dmicheck: type 22 offset 9 is an enum from 1 to 8

Alex Hung alex.hung at canonical.com
Tue May 23 19:28:07 UTC 2017


Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 316df7c..5f010f5 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1591,8 +1591,7 @@ static void dmicheck_entry(fwts_framework *fw,
 			if (data[0x07] || hdr->length < 0x1A)
 				dmi_str_check(fw, table, addr, "Serial Number", hdr, 0x7);
 			dmi_str_check(fw, table, addr, "Device Name", hdr, 0x8);
-			if (data[0x09] != 0x02 || hdr->length < 0x1A)
-				dmi_str_check(fw, table, addr, "Device Chemistry", hdr, 0x9);
+			dmi_min_max_uint8_check(fw, table, addr, "Device Chemistry", hdr, 0x9, 1, 8);
 
 			dmi_str_check(fw, table, addr, "SBDS Version Number", hdr, 0xe);
 			if (data[0xf] != 0xff)
-- 
2.7.4




More information about the fwts-devel mailing list