[PATCH] thunderbolt: fix incorrect value assigned to req->response_type

From: Colin King
Date: Tue Aug 15 2017 - 10:31:49 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

req->response_type is being assigned the sizeof TB_CFG_PKG_RESET
and should actually be assigned TB_CFG_PKG_RESET. Fix this.

Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
drivers/thunderbolt/ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index 69c0232a22f8..fb40dd0588b9 100644
--- a/drivers/thunderbolt/ctl.c
+++ b/drivers/thunderbolt/ctl.c
@@ -804,7 +804,7 @@ struct tb_cfg_result tb_cfg_reset(struct tb_ctl *ctl, u64 route,
req->request_type = TB_CFG_PKG_RESET;
req->response = &reply;
req->response_size = sizeof(reply);
- req->response_type = sizeof(TB_CFG_PKG_RESET);
+ req->response_type = TB_CFG_PKG_RESET;

res = tb_cfg_request_sync(ctl, req, timeout_msec);

--
2.11.0