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>
master
Simon Glass 10 years ago
parent 6b18656aff
commit d11e8fd86e
  1. 1
      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;

Loading…
Cancel
Save