aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/hbm.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-02-10 03:39:43 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-01 22:37:00 -0500
commitbca67d681c4864b74fa5fae9ee47e562d1e272b1 (patch)
tree1538db82496b44cc2f7343714ed4a949311f1815 /drivers/misc/mei/hbm.c
parent5db7514d9333c920791538c850cfb9dbd19025f7 (diff)
mei: always initialize the callback with the intended operation type
We set the operation type at initialization time as each cb is used only for a single type of operation As a byproduct we add a convenient wrapper for allocating cb with the data buffer. Signed-off-by: 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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index 4f83e9aaa6f9..2c581dcaf3b1 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -684,10 +684,9 @@ static int mei_hbm_fw_disconnect_req(struct mei_device *dev,
684 cl->state = MEI_FILE_DISCONNECTED; 684 cl->state = MEI_FILE_DISCONNECTED;
685 cl->timer_count = 0; 685 cl->timer_count = 0;
686 686
687 cb = mei_io_cb_init(cl, NULL); 687 cb = mei_io_cb_init(cl, MEI_FOP_DISCONNECT_RSP, NULL);
688 if (!cb) 688 if (!cb)
689 return -ENOMEM; 689 return -ENOMEM;
690 cb->fop_type = MEI_FOP_DISCONNECT_RSP;
691 cl_dbg(dev, cl, "add disconnect response as first\n"); 690 cl_dbg(dev, cl, "add disconnect response as first\n");
692 list_add(&cb->list, &dev->ctrl_wr_list.list); 691 list_add(&cb->list, &dev->ctrl_wr_list.list);
693 } 692 }