[PATCH v1 2/2] x86: Prevent from missing the FADT chaining

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Aug 25 16:02:00 CEST 2023


On Fri, Aug 25, 2023 at 04:51:41PM +0300, Andy Shevchenko wrote:

...

> +static inline int acpi_add_fadt(struct acpi_ctx *ctx, struct acpi_fadt *fadt)
> +{
> +	acpi_add_table(ctx, fadt);
> +	acpi_inc(ctx, sizeof(struct acpi_fadt));
> +	return 0;
> +}

Ideally it should be like

	int ret;

	ret = acpi_add_table(ctx, fadt);
	if (ret)
		return ret;

	acpi_inc(ctx, sizeof(struct acpi_fadt));

	return 0;

-- 
With Best Regards,
Andy Shevchenko




More information about the U-Boot mailing list