summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/hbm.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-23 19:29:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-23 19:29:25 +0200
commite24ca92599cb73ea6d2f768632f4e30b6f9983cf (patch)
tree0f4adc06e26606a02417eb95f0aae81607666827 /drivers/misc/mei/hbm.c
parent20f7151d63abbb5281ec036197ed822843be1ebf (diff)
Revert "mei: Avoid the use of one-element arrays"
This reverts commit 3c3b7ddef7879abb2c42422e898145826c79e5f0, as it turns out Tomas made a better series of patches for this same issue. Cc: Gustavo A. R. Silva <gustavoars@kernel.org> Cc: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/hbm.c')
-rw-r--r--drivers/misc/mei/hbm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index f020d5594154..a44094cdbc36 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -408,14 +408,14 @@ static int mei_hbm_add_cl_resp(struct mei_device *dev, u8 addr, u8 status)
{
struct mei_msg_hdr mei_hdr;
struct hbm_add_client_response resp;
- const size_t len = sizeof(resp);
+ const size_t len = sizeof(struct hbm_add_client_response);
int ret;
dev_dbg(dev->dev, "adding client response\n");
mei_hbm_hdr(&mei_hdr, len);
- memset(&resp, 0, len);
+ memset(&resp, 0, sizeof(struct hbm_add_client_response));
resp.hbm_cmd = MEI_HBM_ADD_CLIENT_RES_CMD;
resp.me_addr = addr;
resp.status = status;