ACK: [PATCH] dmicheck: skip type 17 test if no memory module

Colin Ian King colin.king at canonical.com
Tue Dec 17 11:55:12 UTC 2019


On 17/12/2019 11:48, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/dmi/dmicheck/dmicheck.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index d6220ed7..38f7f25c 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -1606,6 +1606,10 @@ static void dmicheck_entry(fwts_framework *fw,
>  
>  		case 17: /* 7.18 */
>  			table = "Memory Device (Type 17)";
> +
> +			/* skip if memory module is not installed (size = 0) */
> +			if (GET_UINT16(data + 0xc) == 0)
> +				break;
>  			if (hdr->length < 0x15)
>  				break;
>  			dmi_min_max_uint8_check(fw, table, addr, "Form Factor", hdr, 0xe, 0x1, 0xf);
> 

Seems reasonable to me.

Thanks Alex,

Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list