OSDN Git Service

acpi/nfit: fix cmd_rc for acpi_nfit_ctl to always return a value
authorDave Jiang <dave.jiang@intel.com>
Thu, 28 Jun 2018 16:56:55 +0000 (09:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:12:34 +0000 (13:12 +0200)
commit23458d7f976c4fedfa473cbb0d7620be4847f783
tree5bef7be9026cac6b1c68ccfeae9afea9cea376f8
parent21fe14fa3f42e27cd771acf108c4dd05f13a718c
acpi/nfit: fix cmd_rc for acpi_nfit_ctl to always return a value

[ Upstream commit c1985cefd844e26bd19673a6df8d8f0b1918c2db ]

cmd_rc is passed in by reference to the acpi_nfit_ctl() function and the
caller expects a value returned. However, when the package is pass through
via the ND_CMD_CALL command, cmd_rc is not touched. Make sure cmd_rc is
always set.

Fixes: aef253382266 ("libnvdimm, nfit: centralize command status translation")

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/nfit/core.c