summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-11 18:06:30 -0700
committerSimon Glass <sjg@chromium.org>2014-11-22 10:16:48 +0100
commitd11e8fd86e0fe883cdc00e040bb9e1a67573cf4e (patch)
tree3f60fc3180418f04f50a9b8d2f4fef9e86987cfc /drivers/misc
parent6b18656aff0a1aec15528c47cc6108b44b559f7c (diff)
downloadu-boot-imx-d11e8fd86e0fe883cdc00e040bb9e1a67573cf4e.zip
u-boot-imx-d11e8fd86e0fe883cdc00e040bb9e1a67573cf4e.tar.gz
u-boot-imx-d11e8fd86e0fe883cdc00e040bb9e1a67573cf4e.tar.bz2
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 <sjg@chromium.org> Reported-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/cros_ec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index 521edfd..9b4effb 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;