Re: [PATCH v9 03/16] CXL/AER: Introduce kfifo for forwarding CXL errors
From: Dan Carpenter
Date: Wed Jun 04 2025 - 02:02:32 EST
On Tue, Jun 03, 2025 at 12:22:26PM -0500, Terry Bowman wrote:
> +static struct work_struct cxl_prot_err_work;
> +static DECLARE_WORK(cxl_prot_err_work, cxl_prot_err_work_fn);
> +
> int cxl_ras_init(void)
> {
> - return cxl_cper_register_prot_err_work(&cxl_cper_prot_err_work);
> + int rc;
> +
> + rc = cxl_cper_register_prot_err_work(&cxl_cper_prot_err_work);
> + if (rc)
> + pr_err("Failed to register CPER AER kfifo (%x)", rc);
This shouldn't return rc;?
> +
> + rc = cxl_register_prot_err_work(&cxl_prot_err_work);
> + if (rc) {
> + pr_err("Failed to register native AER kfifo (%x)", rc);
> + return rc;
> + }
> +
> + return 0;
> }
regards,
dan carpenter