summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/comm-host.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/comm-host.c b/util/comm-host.c
index f8be25294c..e020cf8840 100644
--- a/util/comm-host.c
+++ b/util/comm-host.c
@@ -95,11 +95,13 @@ int comm_init_alt(int interfaces, const char *device_name)
* cros_ec device */
if (!strcmp(CROS_EC_DEV_NAME, device_name)) {
/* Fallback to direct LPC on x86 */
- if ((interfaces & COMM_LPC) && !comm_init_lpc())
+ if ((interfaces & COMM_LPC) &&
+ comm_init_lpc && !comm_init_lpc())
return 0;
/* Fallback to direct i2c on ARM */
- if ((interfaces & COMM_I2C) && !comm_init_i2c())
+ if ((interfaces & COMM_I2C) &&
+ comm_init_i2c && !comm_init_i2c())
return 0;
}