[U-Boot] [PATCH] cros_ec: Fix uninitialised variable in cros_ec.c
Simon Glass
sjg at chromium.org
Wed Nov 12 02:06:30 CET 2014
This fixes this cppcheck report:
[drivers/misc/cros_ec.c:704]: (error) Uninitialized variable: req
Signed-off-by: Simon Glass <sjg at chromium.org>
Reported-by: Wolfgang Denk <wd at denx.de>
---
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 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;
--
2.1.0.rc2.206.gedb03e5
More information about the U-Boot
mailing list