boards: st: sensortile_box_pro: fix usb console init

Init should return errno value.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
This commit is contained in:
Frederic Pillon 2024-05-14 16:44:48 +02:00 committed by Anas Nashif
commit 43039afbdf

View file

@ -20,11 +20,10 @@ static int sensortile_box_pro_usb_console_init(void)
{ {
const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console)); const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
if (!device_is_ready(dev) || usb_enable(NULL)) { if (!device_is_ready(dev)) {
return -1; return -ENODEV;
} }
return usb_enable(NULL);
return 0;
} }
/* needs to be done at Application */ /* needs to be done at Application */