summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/nvdimm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/nvdimm')
-rw-r--r--kernel/drivers/nvdimm/bus.c10
-rw-r--r--kernel/drivers/nvdimm/pfn_devs.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/kernel/drivers/nvdimm/bus.c b/kernel/drivers/nvdimm/bus.c
index 7e2c43f70..5f47356d6 100644
--- a/kernel/drivers/nvdimm/bus.c
+++ b/kernel/drivers/nvdimm/bus.c
@@ -335,7 +335,7 @@ static const struct nd_cmd_desc __nd_cmd_dimm_descs[] = {
[ND_CMD_IMPLEMENTED] = { },
[ND_CMD_SMART] = {
.out_num = 2,
- .out_sizes = { 4, 8, },
+ .out_sizes = { 4, 128, },
},
[ND_CMD_SMART_THRESHOLD] = {
.out_num = 2,
@@ -513,10 +513,10 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm,
/* fail write commands (when read-only) */
if (read_only)
- switch (ioctl_cmd) {
- case ND_IOCTL_VENDOR:
- case ND_IOCTL_SET_CONFIG_DATA:
- case ND_IOCTL_ARS_START:
+ switch (cmd) {
+ case ND_CMD_VENDOR:
+ case ND_CMD_SET_CONFIG_DATA:
+ case ND_CMD_ARS_START:
dev_dbg(&nvdimm_bus->dev, "'%s' command while read-only.\n",
nvdimm ? nvdimm_cmd_name(cmd)
: nvdimm_bus_cmd_name(cmd));
diff --git a/kernel/drivers/nvdimm/pfn_devs.c b/kernel/drivers/nvdimm/pfn_devs.c
index 71805a1aa..9d3974591 100644
--- a/kernel/drivers/nvdimm/pfn_devs.c
+++ b/kernel/drivers/nvdimm/pfn_devs.c
@@ -275,7 +275,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn)
} else {
/* from init we validate */
if (memcmp(nd_pfn->uuid, pfn_sb->uuid, 16) != 0)
- return -EINVAL;
+ return -ENODEV;
}
/*