[PATCH -next] usb: early: Fix an error code in xdbc_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When xdbc_trace("hardware not used anymore\n") is performed,
ret should be assigned -ENODEV to indicate this.

Clean up smatch warning:
drivers/usb/early/xhci-dbc.c:972 xdbc_init() warn: missing error code
'ret'

Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
---
 drivers/usb/early/xhci-dbc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c
index 4502108069cd..fcb05a8948fa 100644
--- a/drivers/usb/early/xhci-dbc.c
+++ b/drivers/usb/early/xhci-dbc.c
@@ -969,6 +969,7 @@ static int __init xdbc_init(void)
 	if (early_xdbc_console.index == -1 ||
 	    (early_xdbc_console.flags & CON_BOOT)) {
 		xdbc_trace("hardware not used anymore\n");
+		ret = -ENODEV;
 		goto free_and_quit;
 	}
 
-- 
2.20.1.7.g153144c




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux