From: Simon Glass Date: Wed, 12 Nov 2014 01:06:30 +0000 (-0700) Subject: cros_ec: Fix uninitialised variable in cros_ec.c X-Git-Tag: v2015.01-rc2~4^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d11e8fd86e0fe883cdc00e040bb9e1a67573cf4e;p=oweals%2Fu-boot.git 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 --- 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;