From 83aac1359006046e3d7259083ce31510b3b4cc31 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Tue, 4 Aug 2020 09:36:16 -0700 Subject: drivers/usb: Replace return value -10 with variable Coverity detects that value assigned to variable "ret" is overwritten before it is used. Fix the issue by returning right value. Found-by: Coverity CID 1255942, 1241836 TEST=None Signed-off-by: John Zhao Change-Id: I2e1fb5400ff64c6178bb30601896780f8d67b5c6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44185 Reviewed-by: Angel Pons Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/drivers/usb/ehci_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/usb') diff --git a/src/drivers/usb/ehci_debug.c b/src/drivers/usb/ehci_debug.c index 5998172b87..ab76f3bb3a 100644 --- a/src/drivers/usb/ehci_debug.c +++ b/src/drivers/usb/ehci_debug.c @@ -600,7 +600,7 @@ next_debug_port: goto try_next_time; } - return -10; + return ret; } static int dbgp_enabled(void) -- cgit v1.2.3