aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/interface.c')
-rw-r--r--drivers/misc/mei/interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/interface.c b/drivers/misc/mei/interface.c
index 88ada64c0b54..509c3957ff45 100644
--- a/drivers/misc/mei/interface.c
+++ b/drivers/misc/mei/interface.c
@@ -135,7 +135,7 @@ int mei_write_message(struct mei_device *dev, struct mei_msg_hdr *header,
135 empty_slots = mei_hbuf_empty_slots(dev); 135 empty_slots = mei_hbuf_empty_slots(dev);
136 dev_dbg(&dev->pdev->dev, "empty slots = %hu.\n", empty_slots); 136 dev_dbg(&dev->pdev->dev, "empty slots = %hu.\n", empty_slots);
137 137
138 dw_cnt = (length + sizeof(*header) + 3) / 4; 138 dw_cnt = mei_data2slots(length);
139 if (empty_slots < 0 || dw_cnt > empty_slots) 139 if (empty_slots < 0 || dw_cnt > empty_slots)
140 return -EIO; 140 return -EIO;
141 141