Re: [RFC PATCH 1/9] cxl/acpi: Add an acpi_cxl module for the CXL interconnect

Bjorn Helgaas
2020-11-12T01:56:12Z

On Tue, Nov 10, 2020 at 09:43:48PM -0800, Ben Widawsky wrote:

> +static int acpi_cxl_add(struct acpi_device *adev)
> +{
> + struct acpi_cxl_desc *acpi_desc;
> + struct device *dev = &adev->dev;
> + struct acpi_table_header *tbl;
> + acpi_status status = AE_OK;

Pointless init.

> + acpi_size sz;
> + int rc = 0;

Pointless init.

> + status = acpi_get_table(ACPI_SIG_CEDT, 0, &tbl);
> + if (ACPI_FAILURE(status)) {
> + dev_err(dev, "failed to find CEDT at startup\n");
> + return 0;
> + }
> +
> + rc = devm_add_action_or_reset(dev, acpi_cedt_put_table, tbl);
> + if (rc)
> + return rc;