summaryrefslogtreecommitdiff
path: root/drivers/misc/cros_ec_sandbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/cros_ec_sandbox.c')
-rw-r--r--drivers/misc/cros_ec_sandbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 3ac690a3733..432b1fbb0c4 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -540,7 +540,7 @@ static int process_cmd(struct ec_state *ec,
const struct ec_params_vstore_write *req = req_data;
struct vstore_slot *slot;
- if (req->slot >= EC_VSTORE_SLOT_MAX)
+ if (req->slot >= VSTORE_SLOT_COUNT)
return -EINVAL;
slot = &ec->slot[req->slot];
slot->locked = true;
@@ -553,7 +553,7 @@ static int process_cmd(struct ec_state *ec,
struct ec_response_vstore_read *resp = resp_data;
struct vstore_slot *slot;
- if (req->slot >= EC_VSTORE_SLOT_MAX)
+ if (req->slot >= VSTORE_SLOT_COUNT)
return -EINVAL;
slot = &ec->slot[req->slot];
memcpy(resp->data, slot->data, EC_VSTORE_SLOT_SIZE);