fdt_virtio_mmio: bug fix, should not return when ret == -ENODEV

-ENODEV is a normal error code for function virtio_register_mmio_device()
because the virtio device is not must be in the mmio register address

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang 2024-08-19 22:09:23 +08:00 committed by Xiang Xiao
parent e83c7aba1c
commit e8467a9bd5

View file

@ -22,6 +22,7 @@
* Included Files
****************************************************************************/
#include <debug.h>
#include <errno.h>
#include <nuttx/fdt.h>
@ -76,7 +77,7 @@ int fdt_virtio_mmio_devices_register(FAR const void *fdt, int irqbase)
}
ret = virtio_register_mmio_device((FAR void *)addr, irqnum);
if (ret < 0)
if (ret < 0 && ret != -ENODEV)
{
return ret;
}