summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-07-09 19:33:05 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-11 01:34:01 +0000
commitce32396e6cfbc3ee3a1911338e77816fddd2843d (patch)
tree7294ae62d29b381ec0e0cfc8f599bfad56a980a7 /test
parentdccc9023faec5a7c55487fcf6ca6d1b96d4cd08e (diff)
downloadchrome-ec-ce32396e6cfbc3ee3a1911338e77816fddd2843d.tar.gz
ppc: Fix return values of ppc_is_* to be boolean
The return values for ppc_is_sourcing_vbus(), ppc_is_port_latched_off(), ppc_is_vbus_present() are boolean, so EC_ERROR_UNIMPLEMENTED and EC_ERROR_INVAL cannot be returned. BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ic56fd5ac75e5f0ad6e21c803feb929983f08aaf3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290664 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/usb_ppc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/usb_ppc.c b/test/usb_ppc.c
index af4555ca8d..0cf6f69bf3 100644
--- a/test/usb_ppc.c
+++ b/test/usb_ppc.c
@@ -56,9 +56,9 @@ static int test_ppc_is_sourcing_vbus(void)
int rv;
rv = ppc_is_sourcing_vbus(1);
- TEST_ASSERT(rv == EC_ERROR_INVAL);
+ TEST_ASSERT(rv == 0);
rv = ppc_is_sourcing_vbus(0);
- TEST_ASSERT(rv == EC_ERROR_UNIMPLEMENTED);
+ TEST_ASSERT(rv == 0);
return EC_SUCCESS;
}
@@ -164,9 +164,9 @@ static int test_ppc_is_vbus_present(void)
int rv;
rv = ppc_is_vbus_present(1);
- TEST_ASSERT(rv == EC_ERROR_INVAL);
+ TEST_ASSERT(rv == 0);
rv = ppc_is_vbus_present(0);
- TEST_ASSERT(rv == EC_ERROR_UNIMPLEMENTED);
+ TEST_ASSERT(rv == 0);
return EC_SUCCESS;
}