aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/heci/heci_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/heci/heci_main.c')
-rw-r--r--drivers/staging/heci/heci_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/heci/heci_main.c b/drivers/staging/heci/heci_main.c
index 00e44c78142..daf1107cb8e 100644
--- a/drivers/staging/heci/heci_main.c
+++ b/drivers/staging/heci/heci_main.c
@@ -1140,9 +1140,12 @@ static ssize_t heci_write(struct file *file, const char __user *ubuf,
spin_lock(&file_ext->file_lock);
file_ext->sm_state = 0;
if ((length == 4) &&
- ((memcmp(heci_wd_state_independence_msg[0], ubuf, 4) == 0) ||
- (memcmp(heci_wd_state_independence_msg[1], ubuf, 4) == 0) ||
- (memcmp(heci_wd_state_independence_msg[2], ubuf, 4) == 0)))
+ ((memcmp(heci_wd_state_independence_msg[0],
+ priv_write_cb->request_buffer.data, 4) == 0) ||
+ (memcmp(heci_wd_state_independence_msg[1],
+ priv_write_cb->request_buffer.data, 4) == 0) ||
+ (memcmp(heci_wd_state_independence_msg[2],
+ priv_write_cb->request_buffer.data, 4) == 0)))
file_ext->sm_state |= HECI_WD_STATE_INDEPENDENCE_MSG_SENT;
spin_unlock(&file_ext->file_lock);