mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
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>
This commit is contained in:
parent
658922e57b
commit
2eea65829d
1 changed files with 4 additions and 1 deletions
|
@ -287,8 +287,11 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc,
|
|||
offset);
|
||||
rc = -ENXIO;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
rc = 0;
|
||||
if (cmd_rc)
|
||||
*cmd_rc = xlat_status(buf, cmd);
|
||||
}
|
||||
|
||||
out:
|
||||
ACPI_FREE(out_obj);
|
||||
|
|
Loading…
Add table
Reference in a new issue