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:
parent
bda05fb51a
commit
43039afbdf
1 changed files with 3 additions and 4 deletions
|
@ -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 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue