diff options
Diffstat (limited to 'driver/wpc/cps8100.c')
-rw-r--r-- | driver/wpc/cps8100.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/wpc/cps8100.c b/driver/wpc/cps8100.c index acfdc06a32..bac911d167 100644 --- a/driver/wpc/cps8100.c +++ b/driver/wpc/cps8100.c @@ -544,7 +544,7 @@ static int cc_cps8100(int argc, const char **argv) return EC_ERROR_PARAM_COUNT; port = strtoi(argv[1], &end, 0); - if (*end || port < 0 || pchg_count <= port) + if (*end || port < 0 || board_get_pchg_count() <= port) return EC_ERROR_PARAM2; ctx = &pchgs[port]; |