Skip to content

Commit 2eea658

Browse files
committed
nfit: fix translation of command status results
When transportation of the command completes successfully, it indicates that the 'status' result is valid. Fix the missed checking and translation of the status field at the end of acpi_nfit_ctl(). Otherwise, we fail to handle reported errors and assume commands complete successfully. Reported-by: Linda Knippers <linda.knippers@hpe.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 658922e commit 2eea658

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/acpi/nfit.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,11 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc,
287287
offset);
288288
rc = -ENXIO;
289289
}
290-
} else
290+
} else {
291291
rc = 0;
292+
if (cmd_rc)
293+
*cmd_rc = xlat_status(buf, cmd);
294+
}
292295

293296
out:
294297
ACPI_FREE(out_obj);

0 commit comments

Comments
 (0)