|
@@ -67,6 +67,7 @@ int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd)
|
|
struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(ndd->dev);
|
|
struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(ndd->dev);
|
|
struct nvdimm_bus_descriptor *nd_desc;
|
|
struct nvdimm_bus_descriptor *nd_desc;
|
|
int rc = validate_dimm(ndd);
|
|
int rc = validate_dimm(ndd);
|
|
|
|
+ int cmd_rc = 0;
|
|
|
|
|
|
if (rc)
|
|
if (rc)
|
|
return rc;
|
|
return rc;
|
|
@@ -76,8 +77,11 @@ int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd)
|
|
|
|
|
|
memset(cmd, 0, sizeof(*cmd));
|
|
memset(cmd, 0, sizeof(*cmd));
|
|
nd_desc = nvdimm_bus->nd_desc;
|
|
nd_desc = nvdimm_bus->nd_desc;
|
|
- return nd_desc->ndctl(nd_desc, to_nvdimm(ndd->dev),
|
|
|
|
- ND_CMD_GET_CONFIG_SIZE, cmd, sizeof(*cmd), NULL);
|
|
|
|
|
|
+ rc = nd_desc->ndctl(nd_desc, to_nvdimm(ndd->dev),
|
|
|
|
+ ND_CMD_GET_CONFIG_SIZE, cmd, sizeof(*cmd), &cmd_rc);
|
|
|
|
+ if (rc < 0)
|
|
|
|
+ return rc;
|
|
|
|
+ return cmd_rc;
|
|
}
|
|
}
|
|
|
|
|
|
int nvdimm_init_config_data(struct nvdimm_drvdata *ndd)
|
|
int nvdimm_init_config_data(struct nvdimm_drvdata *ndd)
|