mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +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
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/fdt.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);
|
ret = virtio_register_mmio_device((FAR void *)addr, irqnum);
|
||||||
if (ret < 0)
|
if (ret < 0 && ret != -ENODEV)
|
||||||
{
|
{
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user