|
@@ -408,7 +408,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
|
const guid_t *guid;
|
|
const guid_t *guid;
|
|
int rc, i;
|
|
int rc, i;
|
|
|
|
|
|
- *cmd_rc = -EINVAL;
|
|
|
|
|
|
+ if (cmd_rc)
|
|
|
|
+ *cmd_rc = -EINVAL;
|
|
func = cmd;
|
|
func = cmd;
|
|
if (cmd == ND_CMD_CALL) {
|
|
if (cmd == ND_CMD_CALL) {
|
|
call_pkg = buf;
|
|
call_pkg = buf;
|
|
@@ -519,7 +520,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
|
|
* If we return an error (like elsewhere) then caller wouldn't
|
|
* If we return an error (like elsewhere) then caller wouldn't
|
|
* be able to rely upon data returned to make calculation.
|
|
* be able to rely upon data returned to make calculation.
|
|
*/
|
|
*/
|
|
- *cmd_rc = 0;
|
|
|
|
|
|
+ if (cmd_rc)
|
|
|
|
+ *cmd_rc = 0;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|