mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 09:45:18 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user