diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/platform/chrome/cros_ec_proto.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c index 97a068dff192..3bb954997ebc 100644 --- a/drivers/platform/chrome/cros_ec_proto.c +++ b/drivers/platform/chrome/cros_ec_proto.c | |||
| @@ -56,6 +56,17 @@ static int send_command(struct cros_ec_device *ec_dev, | |||
| 56 | else | 56 | else |
| 57 | xfer_fxn = ec_dev->cmd_xfer; | 57 | xfer_fxn = ec_dev->cmd_xfer; |
| 58 | 58 | ||
| 59 | if (!xfer_fxn) { | ||
| 60 | /* | ||
| 61 | * This error can happen if a communication error happened and | ||
| 62 | * the EC is trying to use protocol v2, on an underlying | ||
| 63 | * communication mechanism that does not support v2. | ||
| 64 | */ | ||
| 65 | dev_err_once(ec_dev->dev, | ||
| 66 | "missing EC transfer API, cannot send command\n"); | ||
| 67 | return -EIO; | ||
| 68 | } | ||
| 69 | |||
| 59 | ret = (*xfer_fxn)(ec_dev, msg); | 70 | ret = (*xfer_fxn)(ec_dev, msg); |
| 60 | if (msg->result == EC_RES_IN_PROGRESS) { | 71 | if (msg->result == EC_RES_IN_PROGRESS) { |
| 61 | int i; | 72 | int i; |
