From d11e8fd86e0fe883cdc00e040bb9e1a67573cf4e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 11 Nov 2014 18:06:30 -0700 Subject: [PATCH] cros_ec: Fix uninitialised variable in cros_ec.c This fixes this cppcheck report: [drivers/misc/cros_ec.c:704]: (error) Uninitialized variable: req Signed-off-by: Simon Glass Reported-by: Wolfgang Denk --- drivers/misc/cros_ec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index 521edfd5de..9b4effb2fb 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -701,6 +701,7 @@ static int cros_ec_check_version(struct cros_ec_dev *dev) /* Try sending a version 3 packet */ dev->protocol_version = 3; + req.in_data = 0; if (ec_command_inptr(dev, EC_CMD_HELLO, 0, &req, sizeof(req), (uint8_t **)&resp, sizeof(*resp)) > 0) { return 0; -- 2.39.5