From: Dan Williams Date: Thu, 1 Nov 2018 07:30:22 +0000 (-0700) Subject: acpi, nfit: Fix ARS overflow continuation X-Git-Tag: rel_imx_4.19.35_1.1.0~8619 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=b0a737bf93f241b61ff33def72bd887787758a5a;p=linux.git acpi, nfit: Fix ARS overflow continuation commit 3fa58dcab50a0aa16817f16a8d38aee869eb3fb9 upstream. When the platform BIOS is unable to report all the media error records it requires the OS to restart the scrub at a prescribed location. The driver detects the overflow condition, but then fails to report it to the ARS state machine after reaping the records. Propagate -ENOSPC correctly to continue the ARS operation. Cc: Fixes: 1cf03c00e7c1 ("nfit: scrub and register regions in a workqueue") Reported-by: Jacek Zloch Reviewed-by: Dave Jiang Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 19b641208d86..c5d15752dfb3 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2845,9 +2845,9 @@ static int acpi_nfit_query_poison(struct acpi_nfit_desc *acpi_desc) return rc; if (ars_status_process_records(acpi_desc)) - return -ENOMEM; + dev_err(acpi_desc->dev, "Failed to process ARS records\n"); - return 0; + return rc; } static int ars_register(struct acpi_nfit_desc *acpi_desc,