summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpm.h
diff options
context:
space:
mode:
authorDivya Sasidharan <divya.s.sasidharan@intel.com>2018-04-19 16:31:13 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-04-20 15:24:58 -0700
commit2952045100592b02c13d9498ac7f0351b7fa1d5f (patch)
treeb013c6f3d6a18b9c589e386734302da6f74ef2be /driver/tcpm/tcpm.h
parent027b18f0e9993a66c55060dfd319dfd87c174ed9 (diff)
downloadchrome-ec-2952045100592b02c13d9498ac7f0351b7fa1d5f.tar.gz
tcpm: Check appropriate NULL pointer for src ctrl
BUG=None BRANCH=None TEST=On yorp; make buildall -j Change-Id: I804f82fd4d3f71080fa2a3ced02dca785a3e9891 Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1020523 Commit-Ready: Divya Sasidharan <divya.s.sasidharan@intel.corp-partner.google.com> Tested-by: Divya Sasidharan <divya.s.sasidharan@intel.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpm.h')
-rw-r--r--driver/tcpm/tcpm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h
index 32ec76bbfc..091527e68a 100644
--- a/driver/tcpm/tcpm.h
+++ b/driver/tcpm/tcpm.h
@@ -154,7 +154,7 @@ static inline int tcpm_set_snk_ctrl(int port, int enable)
static inline int tcpm_set_src_ctrl(int port, int enable)
{
- if (tcpc_config[port].drv->set_snk_ctrl != NULL)
+ if (tcpc_config[port].drv->set_src_ctrl != NULL)
return tcpc_config[port].drv->set_src_ctrl(port, enable);
else
return EC_ERROR_UNIMPLEMENTED;